
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_CONTRACTPROJECT' AND KSQL_COL_NAME ='FPROJECTNAME')
ALTER TABLE T_ER_CONTRACTPROJECT ADD (FPROJECTNAME NVARCHAR(50) DEFAULT ' ' NOT NULL);


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

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

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

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


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

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