/**Begin D:\utils\PDM_UPGRADE\PDM_UPGRADE\PDM1\HRCS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNMSGPERSIST')
CREATE TABLE T_HRCS_WARNMSGPERSIST (
                                       FID BIGINT DEFAULT 0 NOT NULL,
                                       FDESCRIPTION NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                       FWARNSCHEMEID BIGINT DEFAULT 0 NOT NULL,
                                       FDATAHEAD NCLOB,
                                       FLOGID VARCHAR(50) DEFAULT ' ' NOT NULL,
                                       FMSGTITLE NCLOB,
                                       FMSGMAIN NCLOB,
                                       FMSGEND NCLOB,
                                       FCREATORID BIGINT DEFAULT 0 NOT NULL,
                                       FCREATETIME DATETIME,
                                       FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
                                       FMODIFYTIME DATETIME
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNMSGPSRECIVER')
CREATE TABLE T_HRCS_WARNMSGPSRECIVER (
                                         FENTRYID BIGINT DEFAULT 0 NOT NULL,
                                         FSEQ INT DEFAULT 0 NOT NULL,
                                         FRECEIVERID VARCHAR(50) DEFAULT ' ' NOT NULL,
                                         FRECEIVERNAME VARCHAR(250) DEFAULT ' ' NOT NULL,
                                         FID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNMSGROWDATA')
CREATE TABLE T_HRCS_WARNMSGROWDATA (
                                       FID BIGINT DEFAULT 0 NOT NULL,
                                       FMSGPERSISTID BIGINT DEFAULT 0 NOT NULL,
                                       FROWDATA NCLOB
);


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