/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SRC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DEMANDCHANGE' AND KSQL_COL_NAME ='FORGID') 
 ALTER TABLE T_SRC_DEMANDCHANGE ADD (FORGID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_NOTYEARINFO' AND KSQL_COL_NAME ='FPRICE') 
 ALTER TABLE T_SRC_NOTYEARINFO ADD (FPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_X' AND KSQL_COL_NAME ='FSUBMITTERID') 
 ALTER TABLE T_SRC_PROJECT_X ADD (FSUBMITTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_X' AND KSQL_COL_NAME ='FSUBMITDATE') 
 ALTER TABLE T_SRC_PROJECT_X ADD (FSUBMITDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_X' AND KSQL_COL_NAME ='FUNSUBMITTERID') 
 ALTER TABLE T_SRC_PROJECT_X ADD (FUNSUBMITTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_X' AND KSQL_COL_NAME ='FUNSUBMITDATE') 
 ALTER TABLE T_SRC_PROJECT_X ADD (FUNSUBMITDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_X' AND KSQL_COL_NAME ='FUNAUDITORID') 
 ALTER TABLE T_SRC_PROJECT_X ADD (FUNAUDITORID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_X' AND KSQL_COL_NAME ='FUNAUDITDATE') 
 ALTER TABLE T_SRC_PROJECT_X ADD (FUNAUDITDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_SCOREDETAIL' AND KSQL_COL_NAME ='FORGID') 
 ALTER TABLE T_SRC_SCOREDETAIL ADD (FORGID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_CONTRACTENTRY' AND KSQL_COL_NAME ='FORGID') 
 ALTER TABLE T_SRC_CONTRACTENTRY ADD (FORGID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_CONTRACTENTRY' AND KSQL_COL_NAME ='FMATERIALGROUPID') 
 ALTER TABLE T_SRC_CONTRACTENTRY ADD (FMATERIALGROUPID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PAYMENTENTRY' AND KSQL_COL_NAME ='FORGID') 
 ALTER TABLE T_SRC_PAYMENTENTRY ADD (FORGID BIGINT DEFAULT 0 NOT NULL );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SRC_table.sql **/
