-- 审批单中的报表读记录
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_APPROVE_READRECORD')
CREATE TABLE T_EB_APPROVE_READRECORD (
FID BIGINT DEFAULT 0 NOT NULL,
FAPPROVEBILL BIGINT DEFAULT 0 NOT NULL,
FREPORTPROCESS BIGINT DEFAULT 0 NOT NULL,
FCREATERID BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME
);

-- 主键
EXEC P_ALTERPK 'PK_EB_APPROVE_READRECORD', 'T_EB_APPROVE_READRECORD', 'FID', '1';

-- 索引 
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_APPROVE_READRECORD_P1')
CREATE INDEX IDX_EB_APPROVE_READRECORD_P1 ON T_EB_APPROVE_READRECORD (FAPPROVEBILL);