/**Begin C:\PDM_UPGRADE\PDM1\SRC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DEMAND' AND KSQL_COL_NAME IN ('FISMULTISCENE')) 
 ALTER TABLE T_SRC_DEMAND ADD (FISMULTISCENE CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DEMAND' AND KSQL_COL_NAME IN ('FSOURCETYPEID')) 
 ALTER TABLE T_SRC_DEMAND ADD (FSOURCETYPEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DEMAND' AND KSQL_COL_NAME IN ('FSRCTYPEID')) 
 ALTER TABLE T_SRC_DEMAND ADD (FSRCTYPEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_M' AND KSQL_COL_NAME IN ('FSUBMITTERID')) 
 ALTER TABLE T_SRC_PROJECT_M ADD (FSUBMITTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_M' AND KSQL_COL_NAME IN ('FSUBMITDATE')) 
 ALTER TABLE T_SRC_PROJECT_M ADD (FSUBMITDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_M' AND KSQL_COL_NAME IN ('FUNSUBMITTERID')) 
 ALTER TABLE T_SRC_PROJECT_M ADD (FUNSUBMITTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_M' AND KSQL_COL_NAME IN ('FUNSUBMITDATE')) 
 ALTER TABLE T_SRC_PROJECT_M ADD (FUNSUBMITDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_M' AND KSQL_COL_NAME IN ('FUNAUDITDATE')) 
 ALTER TABLE T_SRC_PROJECT_M ADD (FUNAUDITDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_M' AND KSQL_COL_NAME IN ('FUNAUDITORID')) 
 ALTER TABLE T_SRC_PROJECT_M ADD (FUNAUDITORID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_M' AND KSQL_COL_NAME IN ('FLASTUPDATEUSERID')) 
 ALTER TABLE T_SRC_PROJECT_M ADD (FLASTUPDATEUSERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_M' AND KSQL_COL_NAME IN ('FLASTUPDATETIME')) 
 ALTER TABLE T_SRC_PROJECT_M ADD (FLASTUPDATETIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_PROJECT_U') 
 CREATE TABLE T_SRC_PROJECT_U (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FBIZSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FSUBMITTERID BIGINT DEFAULT 0 NOT NULL,
FSUBMITDATE DATETIME,
FUNSUBMITTERID BIGINT DEFAULT 0 NOT NULL,
FUNSUBMITDATE DATETIME,
FUNAUDITDATE DATETIME,
FUNAUDITORID BIGINT DEFAULT 0 NOT NULL,
FLASTUPDATEUSERID BIGINT DEFAULT 0 NOT NULL,
FLASTUPDATETIME DATETIME
);



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