/**Begin D:\PDM_UPGRADE\PDM1\BOS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_GRAYFEATURESCHEME') 
 CREATE TABLE T_LIC_GRAYFEATURESCHEME (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FINTRODUCTION NVARCHAR(1024) DEFAULT ' ' NOT NULL,
FDETAILURL NVARCHAR(255) DEFAULT ' ' NOT NULL,
FMINVERSION NVARCHAR(80) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_GRAYFEATSCHECLD') 
 CREATE TABLE T_LIC_GRAYFEATSCHECLD (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCLOUDID VARCHAR(100) DEFAULT ' ' NOT NULL,
FCLOUDNUM VARCHAR(100) DEFAULT ' ' NOT NULL,
FPRODUCT BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_GRAYFEATSCHEAPP') 
 CREATE TABLE T_LIC_GRAYFEATSCHEAPP (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FAPPID VARCHAR(100) DEFAULT ' ' NOT NULL,
FAPPNUM VARCHAR(100) DEFAULT ' ' NOT NULL,
FPRODUCT BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_GRAYFEATSCHEOBJ') 
 CREATE TABLE T_LIC_GRAYFEATSCHEOBJ (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FENTITYID VARCHAR(100) DEFAULT ' ' NOT NULL,
FENTITYNUM VARCHAR(100) DEFAULT ' ' NOT NULL,
FPRODUCT BIGINT DEFAULT 0 NOT NULL,
FAPPNUM VARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_GRAYFEATURE') 
 CREATE TABLE T_LIC_GRAYFEATURE (
FID BIGINT DEFAULT 0 NOT NULL,
FSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FSTATUS VARCHAR(30) DEFAULT ' ' NOT NULL,
FAPPLICATIONDATE DATETIME,
FGRAYENDDATE DATETIME,
FBEGINDATE DATETIME,
FENDDATE DATETIME
);



/**End D:\PDM_UPGRADE\PDM1\BOS_table.sql **/
