/**Begin D:\utils\PDM_UPGRADE\PDM_UPGRADE\PDM1\HRCS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNPLAN')
CREATE TABLE T_HRCS_WARNPLAN (
                                   FID BIGINT DEFAULT 0 NOT NULL,
                                   FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
                                   FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                   FSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
                                   FENABLE VARCHAR(2) DEFAULT ' ' NOT NULL,
                                   FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                   FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
                                   FBASECONDITION NCLOB DEFAULT ' ',
                                   FREPEATPERIOD VARCHAR(10) DEFAULT ' ' NOT NULL,
                                   FWEEKDAY VARCHAR(30) DEFAULT ' ' NOT NULL,
                                   FMONTHDAY VARCHAR(150) DEFAULT ' ' NOT NULL,
                                   FYEARDAY VARCHAR(10) DEFAULT ' ' NOT NULL,
                                   FJOBID VARCHAR(50) DEFAULT ' ' NOT NULL,
                                   FPLANID VARCHAR(200) DEFAULT ' ' NOT NULL,
                                   FMONITORTIME VARCHAR(10) DEFAULT ' ' NOT NULL,
                                   FPUSHCHANNEL VARCHAR(255) DEFAULT ' ' NOT NULL,
                                   FJUMPHANDLE VARCHAR(255) DEFAULT ' ' NOT NULL,
                                   FWARNSCENEID BIGINT DEFAULT 0 NOT NULL,
                                   FBIZAPPID VARCHAR(36) DEFAULT ' ' NOT NULL,
                                   FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
                                   FTIMEZONE BIGINT DEFAULT 0 NOT NULL,
                                   FSTARTDATE DATETIME,
                                   FENDDATE DATETIME,
                                   FRCFIX CHAR(1) DEFAULT '0' NOT NULL,
                                   FORG BIGINT DEFAULT 0 NOT NULL,
                                   FOWNER BIGINT DEFAULT 0 NOT NULL,
                                   FADMINORG BIGINT DEFAULT 0 NOT NULL,
                                   FCREATORID BIGINT DEFAULT 0 NOT NULL,
                                   FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
                                   FCREATETIME DATETIME,
                                   FMODIFYTIME DATETIME,
                                   FMASTERID BIGINT DEFAULT 0 NOT NULL,
                                   FINDEX INT DEFAULT 0 NOT NULL,
                                   FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
                                   FDISABLERID BIGINT DEFAULT 0 NOT NULL,
                                   FDISABLEDATE DATETIME
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_RCFIX')
CREATE TABLE T_HRCS_RCFIX (
                              FENTRYID BIGINT DEFAULT 0 NOT NULL,
                              FSEQ INT DEFAULT 0 NOT NULL,
                              FUSER BIGINT DEFAULT 0 NOT NULL,
                              FPERM CHAR(1) DEFAULT '0' NOT NULL,
                              FID BIGINT DEFAULT 0 NOT NULL
);



/**End D:\utils\PDM_UPGRADE\PDM_UPGRADE\PDM1\HRCS_table.sql **/
