/**Begin D:\PDM_UPGRADE\PDM1\CAS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL_C' AND KSQL_COL_NAME IN ('FPROXYBEBANK')) 
 ALTER TABLE T_CAS_PAYMENTBILL_C ADD (FPROXYBEBANK BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL_C' AND KSQL_COL_NAME IN ('FPROXYBEBANKNAME')) 
 ALTER TABLE T_CAS_PAYMENTBILL_C ADD (FPROXYBEBANKNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL_C' AND KSQL_COL_NAME IN ('FPROXYBEBANKSC')) 
 ALTER TABLE T_CAS_PAYMENTBILL_C ADD (FPROXYBEBANKSC NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL_C' AND KSQL_COL_NAME IN ('FPROXYBEBANKAD')) 
 ALTER TABLE T_CAS_PAYMENTBILL_C ADD (FPROXYBEBANKAD NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL_C' AND KSQL_COL_NAME IN ('FPROXYBEBANKCOUNTRY')) 
 ALTER TABLE T_CAS_PAYMENTBILL_C ADD (FPROXYBEBANKCOUNTRY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL_C' AND KSQL_COL_NAME IN ('FPROXYBEBANKACTNO')) 
 ALTER TABLE T_CAS_PAYMENTBILL_C ADD (FPROXYBEBANKACTNO NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL_C' AND KSQL_COL_NAME IN ('FPROXYBEBANKACTNAME')) 
 ALTER TABLE T_CAS_PAYMENTBILL_C ADD (FPROXYBEBANKACTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL_E' AND KSQL_COL_NAME IN ('FSUPPLIERBANKID')) 
 ALTER TABLE T_CAS_PAYMENTBILL_E ADD (FSUPPLIERBANKID BIGINT DEFAULT 0 NOT NULL );

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