/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MDL_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_DEPLOYPACKAGE') 
 CREATE TABLE T_BAS_DEPLOYPACKAGE (
FID BIGINT DEFAULT 0 NOT NULL,
FPKNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FVERSION VARCHAR(20) DEFAULT ' ' NOT NULL,
FRESULT CHAR(1) DEFAULT '0' NOT NULL,
FISV VARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTENT NCLOB,
FTYPE CHAR(1) DEFAULT '3' NOT NULL,
FCREATETIME DATETIME DEFAULT GETDATE() NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BAS_DEPLOYINFO' AND KSQL_COL_NAME ='FDPKGID') 
 ALTER TABLE T_BAS_DEPLOYINFO ADD (FDPKGID BIGINT DEFAULT 0 NOT NULL );

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