/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SCH_DEPLOYINFO') 
 CREATE TABLE T_SCH_DEPLOYINFO (
FID BIGINT DEFAULT 0 NOT NULL,
FFILENAME VARCHAR(255) DEFAULT ' ' NOT NULL,
FEXECTIME DATETIME DEFAULT GETDATE() NOT NULL,
FSCHID VARCHAR(36) DEFAULT ' ' NOT NULL,
FVERSION VARCHAR(10) DEFAULT ' ' NOT NULL,
FEXPORTTIME DATETIME,
FPATH VARCHAR(50) DEFAULT ' ' NOT NULL
);


 EXEC P_ALTERPK 'PK_T_SCH_DEPLOYINFO', 'T_SCH_DEPLOYINFO', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SCH_DEPLOYINFO' AND KSQL_INDNAME = 'IDX_SCH_DEPLOYINFO_SCHID') CREATE INDEX IDX_SCH_DEPLOYINFO_SCHID ON T_SCH_DEPLOYINFO ( FSCHID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SCH_DEPLOYINFO' AND KSQL_INDNAME = 'IDX_SCH_DEPLOYINFO_FILENAME') CREATE INDEX IDX_SCH_DEPLOYINFO_FILENAME ON T_SCH_DEPLOYINFO ( FFILENAME );

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