在APIMGT的Oracle sql脚本中,存在类型错误。 AUTOINCREMENT无效,创建触发器中出现语法错误。正确的语法是:
CREATE TABLE AM_WORKFLOWS(
WF_ID INTEGER,
WF_REFERENCE VARCHAR(255) NOT NULL,
WF_TYPE VARCHAR(255) NOT NULL,
WF_STATUS VARCHAR(255) NOT NULL,
WF_CREATED_TIME TIMESTAMP,
WF_UPDATED_TIME TIMESTAMP,
WF_STATUS_DESC VARCHAR(1000),
TENANT_ID INTEGER,
TENANT_DOMAIN VARCHAR(255),
WF_EXTERNAL_REFERENCE VARCHAR(255) NOT NULL UNIQUE,
PRIMARY KEY (WF_ID)
)
/
CREATE OR REPLACE TRIGGER AM_WORKFLOWS_TRIGGER
BEFORE INSERT
ON AM_WORKFLOWS
REFERENCING NEW AS NEW
FOR EACH ROW
BEGIN
SELECT AM_WORKFLOWS_SEQUENCE.nextval INTO :NEW.WF_ID FROM dual;
END;
/