IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNOBJECTTPL') 
 CREATE TABLE T_HRCS_WARNOBJECTTPL (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(500) DEFAULT ' ' NOT NULL,
FFROMENTIYID VARCHAR(60) DEFAULT ' ' NOT NULL,
FBIZAPPID VARCHAR(36) DEFAULT ' ' NOT NULL,
FDATAFILTER NCLOB DEFAULT ' ',
FENABLE VARCHAR(2) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FVERSION INT DEFAULT 0 NOT NULL,
FSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FINDEX INT DEFAULT 0 NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNOBJECTTPL_L')
 CREATE TABLE T_HRCS_WARNOBJECTTPL_L (
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FDESCRIPTION NVARCHAR(500) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNOBJECTENTITY')
 CREATE TABLE T_HRCS_WARNOBJECTENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FENTITYNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISCORE VARCHAR(1) DEFAULT '0' NOT NULL,
FLONGNUMBER VARCHAR(300),
FENTITYNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYALIAS VARCHAR(50) DEFAULT ' ' NOT NULL,
FTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FVERSION INT DEFAULT 0 NOT NULL,
FINDEX INT DEFAULT 0 NOT NULL,
FSOURCE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNOBJECTENTITY_L')
 CREATE TABLE T_HRCS_WARNOBJECTENTITY_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FENTITYNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNOBJECTRELATION')
 CREATE TABLE T_HRCS_WARNOBJECTRELATION (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FENTITYID BIGINT DEFAULT 0 NOT NULL,
FJOINTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FJOINENTITYID BIGINT DEFAULT 0 NOT NULL,
FVERSION INT DEFAULT 0 NOT NULL,
FSOURCE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNOBJECTRELCON')
 CREATE TABLE T_HRCS_WARNOBJECTRELCON (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FLEFTPROP VARCHAR(300) DEFAULT ' ' NOT NULL,
FCOMPARETYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FRIGHTPROP VARCHAR(300) DEFAULT ' ' NOT NULL,
FRIGHTPROPTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FRIGHTPROPVAL NCLOB,
FLOGICTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNOBJECTFIELD')
 CREATE TABLE T_HRCS_WARNOBJECTFIELD (
FID BIGINT DEFAULT 0 NOT NULL,
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FENTITYNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFIELDALIAS VARCHAR(300) DEFAULT ' ' NOT NULL,
FFIELDPATH VARCHAR(300) DEFAULT ' ' NOT NULL,
FVALUETYPE VARCHAR(20) DEFAULT ' ' NOT NULL,
FCOMPLEXTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FCONTROLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FSOURCE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNOBJECTFIELD_L')
 CREATE TABLE T_HRCS_WARNOBJECTFIELD_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);
