/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BIZRULESET' AND KSQL_COL_NAME ='FGROUPID') 
 ALTER TABLE T_EB_BIZRULESET ADD (FGROUPID BIGINT DEFAULT 0 NOT NULL );
 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BIZRULESET' AND KSQL_COL_NAME ='FBIZCTRLRANGEID') 
 ALTER TABLE T_EB_BIZRULESET ADD (FBIZCTRLRANGEID BIGINT DEFAULT 0 NOT NULL );
 
   IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BIZRULESET' AND KSQL_COL_NAME ='FINDEX') 
 ALTER TABLE T_EB_BIZRULESET ADD (FINDEX NVARCHAR(10) DEFAULT ' ' NOT NULL );
 
   IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BIZRULESET' AND KSQL_COL_NAME ='FLEFTMEMBERID') 
 ALTER TABLE T_EB_BIZRULESET ADD (FLEFTMEMBERID BIGINT DEFAULT 0 NOT NULL );
 
    IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BIZRULESET' AND KSQL_COL_NAME ='FMAINDIMENSIONID') 
 ALTER TABLE T_EB_BIZRULESET ADD (FMAINDIMENSIONID BIGINT DEFAULT 0 NOT NULL );
 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BIZRULESET' AND KSQL_COL_NAME ='FBIZMODELS') 
 ALTER TABLE T_EB_BIZRULESET ADD (FBIZMODELS NCLOB );
 
   IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BIZRULESET' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_EB_BIZRULESET ADD (FDESCRIPTION NCLOB );
 
     IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BIZRULEFORMULAACC' AND KSQL_COL_NAME ='FMEMBERID') 
 ALTER TABLE T_EB_BIZRULEFORMULAACC ADD (FMEMBERID BIGINT DEFAULT 0 NOT NULL );
 
      IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_CUSTOMPROPERTY' AND KSQL_COL_NAME ='FVERSION') 
 ALTER TABLE T_EB_CUSTOMPROPERTY ADD (FVERSION BIGINT DEFAULT 0 NOT NULL );
 

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/