/**Begin C:\PDM_UPGRADE\PDM1\SRC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_ENROLLSUPPLIER' AND KSQL_COL_NAME IN ('FPUBLISHSTATUS')) 
 ALTER TABLE T_SRC_ENROLLSUPPLIER ADD (FPUBLISHSTATUS CHAR(1) DEFAULT 'A' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_ENROLLSUPPLIER' AND KSQL_COL_NAME IN ('FPUBLISHDATE')) 
 ALTER TABLE T_SRC_ENROLLSUPPLIER ADD (FPUBLISHDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_ENROLLSUPPLIER' AND KSQL_COL_NAME IN ('FPUBLISHERID')) 
 ALTER TABLE T_SRC_ENROLLSUPPLIER ADD (FPUBLISHERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER_TEMP' AND KSQL_COL_NAME IN ('FREMARK')) 
 ALTER TABLE T_SRC_INVITESUPPLIER_TEMP ADD (FREMARK NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_SCHEMECHG') 
 CREATE TABLE T_SRC_SCHEMECHG (
FID BIGINT DEFAULT 0 NOT NULL,
FPARENTID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTITYKEY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FNEWSCHEMEID BIGINT DEFAULT 0 NOT NULL
);



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