/**Begin D:\Users\rd_william_li\Documents\lipin\PDM\PDM_UPGRADE\pdm_new\BOS_table.sql **/


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PERM_USERDATARULE') 
 CREATE TABLE T_PERM_USERDATARULE (
FID BIGINT DEFAULT 0 NOT NULL,
FUSERID BIGINT DEFAULT 0 NOT NULL,
FAPPID VARCHAR(36) DEFAULT ' ' NOT NULL,
FENTITYNUM VARCHAR(36) DEFAULT ' ' NOT NULL,
FPERMITEMID VARCHAR(18) DEFAULT ' ' NOT NULL,
FDATARULEID BIGINT DEFAULT 0 NOT NULL,
FDIMID BIGINT DEFAULT 0 NOT NULL,
FISINCLUDESUB CHAR(1) DEFAULT '0' NOT NULL,
FDIMTYPE VARCHAR(36) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PERM_USERDATARULE_PROP') 
 CREATE TABLE T_PERM_USERDATARULE_PROP (
FID BIGINT DEFAULT 0 NOT NULL,
FUSERID BIGINT DEFAULT 0 NOT NULL,
FAPPID VARCHAR(36) DEFAULT ' ' NOT NULL,
FENTITYNUM VARCHAR(36) DEFAULT ' ' NOT NULL,
FPROPKEY VARCHAR(60) DEFAULT ' ' NOT NULL,
FPROPENTNUM VARCHAR(36) DEFAULT ' ' NOT NULL,
FDATARULEID BIGINT DEFAULT 0 NOT NULL,
FDIMID BIGINT DEFAULT 0 NOT NULL,
FISINCLUDESUB CHAR(1) DEFAULT '0' NOT NULL,
FDIMTYPE VARCHAR(36) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL
);



/**End D:\Users\rd_william_li\Documents\lipin\PDM\PDM_UPGRADE\pdm_new\BOS_table.sql **/
