/**Begin D:\PDM_UPGRADE\PDM1\HRPTMC_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_QUERYSCHEME') 
 CREATE TABLE T_HRPTMC_QUERYSCHEME (
FID BIGINT DEFAULT 0 NOT NULL,
FRPTMANAGEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FDEFAULTSCHEME CHAR(1) DEFAULT '0' NOT NULL,
FSHARESCHEME CHAR(1) DEFAULT '0' NOT NULL,
FCONTENT NCLOB,
FINDEX INT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_SHARESCHEME') 
 CREATE TABLE T_HRPTMC_SHARESCHEME (
FID BIGINT DEFAULT 0 NOT NULL,
FSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FRPTMANAGEID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPRMC_SCHEMESHAREUSERS') 
 CREATE TABLE T_HRPRMC_SCHEMESHAREUSERS (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);



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