IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PERMLOG_BUSITYPE')
CREATE TABLE T_PERMLOG_BUSITYPE (
    FID BIGINT DEFAULT 0 NOT NULL,
    FBUSITYPE VARCHAR(255) DEFAULT ' ' NOT NULL,
    FBUSITYPE_DESC NVARCHAR(255) DEFAULT ' ' NOT NULL,
    FDIFF_HANDLER VARCHAR(255) DEFAULT ' ' NOT NULL,
    FDETAIL_FORM VARCHAR(255) DEFAULT ' ' NOT NULL,
    FDIRECT_SAVEDIFF CHAR(1) DEFAULT '0' NOT NULL,
    FARCHIVEA_PERIOD INT DEFAULT 0 NOT NULL,
    FARCHIVEA_RETAINDAYS INT DEFAULT 0 NOT NULL,
    FCREATORID BIGINT DEFAULT 0 NOT NULL,
    FCREATE_TIME DATETIME,
    FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
    FMODIFY_TIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PERMLOG_BUSITYPE_L')
CREATE TABLE T_PERMLOG_BUSITYPE_L (
    FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
    FID BIGINT DEFAULT 0 NOT NULL,
    FLOCALEID VARCHAR(36) DEFAULT ' ' NOT NULL,
    FBUSITYPE_DESC NVARCHAR(255) DEFAULT ' ' NOT NULL
);