/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SCH_TASK' AND KSQL_COL_NAME ='FTIMEOUT') 
 ALTER TABLE T_SCH_TASK ADD (FTIMEOUT INT DEFAULT 0 NOT NULL );
 
  
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_PLUGIN') 
 CREATE TABLE T_BAS_PLUGIN (
FID BIGINT DEFAULT 0 NOT NULL,
FNAME VARCHAR(256) DEFAULT ' ' NOT NULL,
FTYPE INT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL,
FDESC NVARCHAR(256) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_PLUGIN_REF') 
 CREATE TABLE T_BAS_PLUGIN_REF (
FENTRYID VARCHAR(36) DEFAULT ' ' NOT NULL,
FTYPE INT DEFAULT 0 NOT NULL,
FID VARCHAR(36) DEFAULT ' ' NOT NULL,
FOBJNAME NVARCHAR(36) DEFAULT ' ' NOT NULL,
FOBJNUMBER VARCHAR(36) DEFAULT ' ' NOT NULL,
FOBJTYPE INT DEFAULT 0 NOT NULL,
FAPPID VARCHAR(36) DEFAULT ' ' NOT NULL,
FCLOUDID VARCHAR(36) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL,
FREF VARCHAR(36) DEFAULT ' ' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL
);



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