IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_LICENSE_TRIAL') 
 CREATE TABLE T_LIC_LICENSE_TRIAL (
FID BIGINT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FPRODINSTCODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FPRODUCTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FPRODUCTNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOFTWARECODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FINDUSTRY VARCHAR(30) DEFAULT ' ' NOT NULL,
FPRODUCTVERSION VARCHAR(30) DEFAULT ' ' NOT NULL,
FSOFTWARENAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FACTIVEDATE DATETIME,
FEXPDATE DATETIME,
FPRODID VARCHAR(36) DEFAULT ' ' NOT NULL,
FNAME VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_LICDETAIL_TRIAL') 
 CREATE TABLE T_LIC_LICDETAIL_TRIAL (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FTOTALCOUNT INT DEFAULT 0 NOT NULL,
FASSIGNEDCOUNT INT DEFAULT 0 NOT NULL,
FREMAINCOUNT INT DEFAULT 0 NOT NULL,
FBEGINDATE DATETIME,
FENDDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_LICGROUPAPPS_TRIAL') 
 CREATE TABLE T_LIC_LICGROUPAPPS_TRIAL (
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FBIZAPPID VARCHAR(36) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_USERLICGROUP_TRIAL') 
 CREATE TABLE T_LIC_USERLICGROUP_TRIAL (
FID BIGINT DEFAULT 0 NOT NULL,
FUSERID BIGINT DEFAULT 0 NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FSYNCSTATUS VARCHAR(30) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FMAINORGNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FMAINORGFULLNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FASSIGNTIME DATETIME,
FLICENSESOURCE VARCHAR(10) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_SNAPSHOT') 
 CREATE TABLE T_LIC_SNAPSHOT (
FID BIGINT DEFAULT 0 NOT NULL,
FDATA NCLOB,
FCREATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_USERBITMAPINDEX') 
 CREATE TABLE T_LIC_USERBITMAPINDEX (
FID BIGINT DEFAULT 0 NOT NULL,
FPHONE VARCHAR(36) DEFAULT ' ' NOT NULL,
FEMAIL VARCHAR(100) DEFAULT ' ' NOT NULL,
FUSERNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBITMAPINDEX BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_LIC_GROUPBITMAP') 
 CREATE TABLE T_LIC_GROUPBITMAP (
FID BIGINT DEFAULT 0 NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FBITMAP BLOB,
FSIGN VARCHAR(256) DEFAULT ' ' NOT NULL
);



