DROP TABLE T_PERM_LOG_DIFF_FPSD;
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PERM_LOG_DIFF_FPSD')
CREATE TABLE T_PERM_LOG_DIFF_FPSD (
FID BIGINT DEFAULT 0 NOT NULL,
FPERM_LOGID BIGINT DEFAULT 0 NOT NULL,
FCLOUD_ID VARCHAR(36) DEFAULT ' ' NOT NULL,
FCLOUD_NAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FAPP_ID VARCHAR(36) DEFAULT ' ' NOT NULL,
FAPP_NAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FENTITY_ID VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITY_NAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FFIELDNAME VARCHAR(255) DEFAULT ' ' NOT NULL,
FFIELDCOMMENT NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCONTROLMODE NVARCHAR(20) DEFAULT ' ' NOT NULL,
FCONTROLMODEDESC NVARCHAR(30) DEFAULT ' ' NOT NULL,
FOP_DESC NVARCHAR(300) DEFAULT ' ' NOT NULL,
FCREATE_TIME DATETIME,
FDATACHANGE_TYPE INT DEFAULT 0 NOT NULL,
FDATACHANGE_TYPE_DESC NVARCHAR(20) DEFAULT ' ' NOT NULL
);


DROP TABLE T_PERM_LOG_DIFF_FPS;
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PERM_LOG_DIFF_FPS')
CREATE TABLE T_PERM_LOG_DIFF_FPS (
FID BIGINT DEFAULT 0 NOT NULL,
FPERM_LOGID BIGINT DEFAULT 0 NOT NULL,
FCLOUD_ID VARCHAR(36) DEFAULT ' ' NOT NULL,
FCLOUD_NAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FAPP_ID VARCHAR(36) DEFAULT ' ' NOT NULL,
FAPP_NAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FENTITY_NUM VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITY_NAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FFPSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FFPSCHEMENAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSENSITIVE CHAR(1) DEFAULT '0' NOT NULL,
FOP_DESC NVARCHAR(300) DEFAULT ' ' NOT NULL,
FCREATE_TIME DATETIME,
FDATACHANGE_TYPE INT DEFAULT 0 NOT NULL,
FDATACHANGE_TYPE_DESC NVARCHAR(20) DEFAULT ' ' NOT NULL
);


DROP TABLE T_PERM_LOG_DIFF_DIMFPS;
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PERM_LOG_DIFF_DIMFPS')
CREATE TABLE T_PERM_LOG_DIFF_DIMFPS (
FID BIGINT DEFAULT 0 NOT NULL,
FPERM_LOGID BIGINT DEFAULT 0 NOT NULL,
FCLOUD_ID VARCHAR(36) DEFAULT ' ' NOT NULL,
FCLOUD_NAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FAPP_ID VARCHAR(36) DEFAULT ' ' NOT NULL,
FAPP_NAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FENTITY_NUM VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITY_NAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FFPSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FFPSCHEMENAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSENSITIVE CHAR(1) DEFAULT '0' NOT NULL,
FDIM_ID BIGINT DEFAULT 0 NOT NULL,
FDIM_NUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FDIM_NAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FINCLUDE_SUBORG CHAR(1) DEFAULT '0' NOT NULL,
FINCLUDE_SUBORG_DESC NVARCHAR(20) DEFAULT ' ' NOT NULL,
FDIMTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FDIMTYPEDESC VARCHAR(30) DEFAULT ' ' NOT NULL,
FOP_DESC NVARCHAR(300) DEFAULT ' ' NOT NULL,
FCREATE_TIME DATETIME,
FDATACHANGE_TYPE INT DEFAULT 0 NOT NULL,
FDATACHANGE_TYPE_DESC NVARCHAR(20) DEFAULT ' ' NOT NULL
);
