/**Begin D:\PDM_UPGRADE\PDM1\BEI_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKLOG' AND KSQL_COL_NAME IN ('FSRCBIZID'))
 ALTER TABLE T_BEI_BANKLOG ADD (FSRCBIZID BIGINT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKLOG_BAK' AND KSQL_COL_NAME IN ('FSRCBIZID'))
 ALTER TABLE T_BEI_BANKLOG_BAK ADD (FSRCBIZID BIGINT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKLOG' AND KSQL_COL_NAME IN ('FBANKPAYSTATE'))
 ALTER TABLE T_BEI_BANKLOG ADD (FBANKPAYSTATE NVARCHAR(30) DEFAULT 'OP' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKLOG_BAK' AND KSQL_COL_NAME IN ('FBANKPAYSTATE'))
 ALTER TABLE T_BEI_BANKLOG_BAK ADD (FBANKPAYSTATE NVARCHAR(30) DEFAULT 'OP' NOT NULL );

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