/**Begin C:\PDM_UPGRADE\PDM1\SRC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT' AND KSQL_COL_NAME IN ('FISBYPACKAGE_APT')) 
 ALTER TABLE T_SRC_PROJECT ADD (FISBYPACKAGE_APT CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PURLISTENTRY' AND KSQL_COL_NAME IN ('FPREORDERRATIO')) 
 ALTER TABLE T_SRC_PURLISTENTRY ADD (FPREORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PURLISTENTRY' AND KSQL_COL_NAME IN ('FPRECFMQTY')) 
 ALTER TABLE T_SRC_PURLISTENTRY ADD (FPRECFMQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECTPACKAGE' AND KSQL_COL_NAME IN ('FISBIZASSESS')) 
 ALTER TABLE T_SRC_PROJECTPACKAGE ADD (FISBIZASSESS CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECTPACKAGE' AND KSQL_COL_NAME IN ('FBIZASSESSDATE')) 
 ALTER TABLE T_SRC_PROJECTPACKAGE ADD (FBIZASSESSDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECTPACKAGE' AND KSQL_COL_NAME IN ('FISAPTASSESS')) 
 ALTER TABLE T_SRC_PROJECTPACKAGE ADD (FISAPTASSESS CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECTPACKAGE' AND KSQL_COL_NAME IN ('FAPTASSESSDATE')) 
 ALTER TABLE T_SRC_PROJECTPACKAGE ADD (FAPTASSESSDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECTPACKAGE' AND KSQL_COL_NAME IN ('FISAPTASSESS2')) 
 ALTER TABLE T_SRC_PROJECTPACKAGE ADD (FISAPTASSESS2 CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECTPACKAGE' AND KSQL_COL_NAME IN ('FAPTASSESSDATE2')) 
 ALTER TABLE T_SRC_PROJECTPACKAGE ADD (FAPTASSESSDATE2 DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_G' AND KSQL_COL_NAME IN ('FSUBMITTERID')) 
 ALTER TABLE T_SRC_PROJECT_G ADD (FSUBMITTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_G' AND KSQL_COL_NAME IN ('FSUBMITDATE')) 
 ALTER TABLE T_SRC_PROJECT_G ADD (FSUBMITDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_G' AND KSQL_COL_NAME IN ('FUNSUBMITTERID')) 
 ALTER TABLE T_SRC_PROJECT_G ADD (FUNSUBMITTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_G' AND KSQL_COL_NAME IN ('FUNSUBMITDATE')) 
 ALTER TABLE T_SRC_PROJECT_G ADD (FUNSUBMITDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_G' AND KSQL_COL_NAME IN ('FUNAUDITDATE')) 
 ALTER TABLE T_SRC_PROJECT_G ADD (FUNAUDITDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_G' AND KSQL_COL_NAME IN ('FUNAUDITORID')) 
 ALTER TABLE T_SRC_PROJECT_G ADD (FUNAUDITORID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_G' AND KSQL_COL_NAME IN ('FLASTUPDATEUSERID')) 
 ALTER TABLE T_SRC_PROJECT_G ADD (FLASTUPDATEUSERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_G' AND KSQL_COL_NAME IN ('FLASTUPDATETIME')) 
 ALTER TABLE T_SRC_PROJECT_G ADD (FLASTUPDATETIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONSUMSUP' AND KSQL_COL_NAME IN ('FPREAMOUNT')) 
 ALTER TABLE T_SRC_DECISIONSUMSUP ADD (FPREAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONSUMSUP' AND KSQL_COL_NAME IN ('FPREORDERRATIO')) 
 ALTER TABLE T_SRC_DECISIONSUMSUP ADD (FPREORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONSUMSUP' AND KSQL_COL_NAME IN ('FPRETAXAMOUNT')) 
 ALTER TABLE T_SRC_DECISIONSUMSUP ADD (FPRETAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONSUMSUP' AND KSQL_COL_NAME IN ('FPREORDERRATIO1')) 
 ALTER TABLE T_SRC_DECISIONSUMSUP ADD (FPREORDERRATIO1 DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_CONTRACTENTRY_A' AND KSQL_COL_NAME IN ('FPREORDERRATIO')) 
 ALTER TABLE T_SRC_CONTRACTENTRY_A ADD (FPREORDERRATIO DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_CONTRACTENTRY_A' AND KSQL_COL_NAME IN ('FPRECFMQTY')) 
 ALTER TABLE T_SRC_CONTRACTENTRY_A ADD (FPRECFMQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_RETENDER' AND KSQL_COL_NAME IN ('FSTOPBIDDATE')) 
 ALTER TABLE T_SRC_RETENDER ADD (FSTOPBIDDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ENROLLSUPPLIER_FJ') 
 CREATE TABLE T_SRC_ENROLLSUPPLIER_FJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);



/**End C:\PDM_UPGRADE\PDM1\SRC_table.sql **/
