Skip to content

Commit

Permalink
Add: PRIMARY key for AM_API_SEQUENCE_BACKEND
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Oct 2, 2024
1 parent d12fca0 commit 732c5e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ CREATE TABLE IF NOT EXISTS AM_API_SEQUENCE_BACKEND (
SEQUENCE LONGBLOB NOT NULL,
NAME VARCHAR(256) NOT NULL,
TYPE VARCHAR(120) NOT NULL,
PRIMARY KEY(ID),
PRIMARY KEY(ID, API_UUID, REVISION_UUID, TYPE),
FOREIGN KEY(API_UUID) REFERENCES AM_API(API_UUID) ON DELETE CASCADE
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,17 @@ CREATE TABLE IF NOT EXISTS AM_API (
UNIQUE (API_PROVIDER,API_NAME,API_VERSION)
);

CREATE TABLE IF NOT EXISTS AM_API_SEQUENCE_BACKEND (
ID VARCHAR(60) NOT NULL,
API_UUID VARCHAR(256) NOT NULL,
REVISION_UUID VARCHAR(256) DEFAULT '0',
SEQUENCE LONGBLOB NOT NULL,
NAME VARCHAR(256) NOT NULL,
TYPE VARCHAR(120) NOT NULL,
PRIMARY KEY(ID, API_UUID, REVISION_UUID, TYPE),
FOREIGN KEY(API_UUID) REFERENCES AM_API(API_UUID) ON DELETE CASCADE
);

CREATE TABLE IF NOT EXISTS AM_API_URL_MAPPING (
URL_MAPPING_ID INTEGER AUTO_INCREMENT,
API_ID INTEGER NOT NULL,
Expand Down

0 comments on commit 732c5e3

Please sign in to comment.