/**Begin D:\PDM_UPGRADE\PDM1\BRM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_DRLFILTER' AND KSQL_COL_NAME ='FSIMPLENAME') 
 ALTER TABLE T_BRM_DRLFILTER ADD (FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_DRLFILTER' AND KSQL_COL_NAME ='FDISABLERID') 
 ALTER TABLE T_BRM_DRLFILTER ADD (FDISABLERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_DRLFILTER' AND KSQL_COL_NAME ='FDISABLEDATE') 
 ALTER TABLE T_BRM_DRLFILTER ADD (FDISABLEDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_DRLFILTER_L' AND KSQL_COL_NAME ='FSIMPLENAME') 
 ALTER TABLE T_BRM_DRLFILTER_L ADD (FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_RULE_TMP' AND KSQL_COL_NAME ='FCREATORID') 
 ALTER TABLE T_BRM_RULE_TMP ADD (FCREATORID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_RULE_TMP' AND KSQL_COL_NAME ='FCREATETIME') 
 ALTER TABLE T_BRM_RULE_TMP ADD (FCREATETIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_RULE_TMP' AND KSQL_COL_NAME ='FMODIFIERID') 
 ALTER TABLE T_BRM_RULE_TMP ADD (FMODIFIERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_RULE_TMP' AND KSQL_COL_NAME ='FMODIFYTIME') 
 ALTER TABLE T_BRM_RULE_TMP ADD (FMODIFYTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_RULE_TMP' AND KSQL_COL_NAME ='FDISABLERID') 
 ALTER TABLE T_BRM_RULE_TMP ADD (FDISABLERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_RULE_TMP' AND KSQL_COL_NAME ='FDISABLEDATE') 
 ALTER TABLE T_BRM_RULE_TMP ADD (FDISABLEDATE DATETIME );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_DRLFILTER' AND KSQL_COL_NAME ='FISSYSPRESET') 
 ALTER TABLE T_BRM_DRLFILTER ADD (FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL );

/**End D:\PDM_UPGRADE\PDM1\BRM_table.sql **/
