Skip to content

Commit

Permalink
Add: Sequence Backend schema for MultiDC
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Sep 26, 2024
1 parent 068529c commit 1889651
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,17 @@ CREATE TABLE AM_API (
UNIQUE (API_UUID)
)
/
CREATE TABLE AM_API_SEQUENCE_BACKEND (
ID VARCHAR2(60) NOT NULL,
API_UUID VARCHAR2(256) NOT NULL,
REVISION_UUID VARCHAR2(256) DEFAULT '0',
SEQUENCE BLOB NOT NULL,
NAME VARCHAR2(256) NOT NULL,
TYPE VARCHAR2(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 AM_GRAPHQL_COMPLEXITY (
UUID VARCHAR(256),
API_ID INTEGER NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,17 @@ CREATE TABLE AM_API (
UNIQUE (API_UUID)
)
/
CREATE TABLE AM_API_SEQUENCE_BACKEND (
ID VARCHAR2(60) NOT NULL,
API_UUID VARCHAR2(256) NOT NULL,
REVISION_UUID VARCHAR2(256) DEFAULT '0',
SEQUENCE BLOB NOT NULL,
NAME VARCHAR2(256) NOT NULL,
TYPE VARCHAR2(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 AM_GRAPHQL_COMPLEXITY (
UUID VARCHAR(256),
API_ID INTEGER NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1858,6 +1858,17 @@ CREATE TABLE IF NOT EXISTS AM_API (
UNIQUE (API_UUID)
);

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 BYTEA 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_GRAPHQL_COMPLEXITY (
UUID VARCHAR(256),
API_ID INTEGER NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,17 @@ CREATE TABLE AM_API (
UNIQUE (API_UUID)
);

CREATE TABLE AM_API_SEQUENCE_BACKEND (
ID VARCHAR(60) NOT NULL,
API_UUID VARCHAR(256) NOT NULL,
REVISION_UUID VARCHAR(256) DEFAULT '0',
SEQUENCE VARBINARY(MAX) 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
);

IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_GRAPHQL_COMPLEXITY]') AND TYPE IN (N'U'))

CREATE TABLE AM_GRAPHQL_COMPLEXITY (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1738,6 +1738,8 @@ CREATE TABLE AM_API (
UNIQUE (API_UUID)
);



IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_GRAPHQL_COMPLEXITY]') AND TYPE IN (N'U'))

CREATE TABLE AM_GRAPHQL_COMPLEXITY (
Expand Down

0 comments on commit 1889651

Please sign in to comment.