-- T_EB_TASKRECEIVER 任务配置接收人
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_TASKRECEIVER') 
CREATE TABLE T_EB_TASKRECEIVER (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FRECEIVERTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FRECEIVERUSER BIGINT DEFAULT 0 NOT NULL,
FSEQ INT NOT NULL DEFAULT 0
);

EXEC P_ALTERPK 'PK_EB_TASKRECEIVER', 'T_EB_TASKRECEIVER', 'FENTRYID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_TASKRECEIVER') 
CREATE INDEX IDX_EB_TASKRECEIVER ON T_EB_TASKRECEIVER (FID);