Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cluster mssql script to avoid warnings #3034

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions distribution/src/dbscripts/mssql/mssql_cluster.sql
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[LEADER_STATUS_TABLE]') AND TYPE IN (N'U'))
CREATE TABLE LEADER_STATUS_TABLE (
GROUP_ID VARCHAR (512) NOT NULL,
NODE_ID VARCHAR (512) NOT NULL,
GROUP_ID VARCHAR (450) NOT NULL,
NODE_ID VARCHAR (450) NOT NULL,
LAST_HEARTBEAT BIGINT NOT NULL,
PRIMARY KEY (GROUP_ID)
);

IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[CLUSTER_NODE_STATUS_TABLE]') AND TYPE IN (N'U'))
CREATE TABLE CLUSTER_NODE_STATUS_TABLE (
GROUP_ID VARCHAR (512) NOT NULL,
NODE_ID VARCHAR (512) NOT NULL,
GROUP_ID VARCHAR (450) NOT NULL,
NODE_ID VARCHAR (450) NOT NULL,
IS_NEW_NODE INT NOT NULL,
LAST_HEARTBEAT BIGINT NOT NULL,
PRIMARY KEY (GROUP_ID, NODE_ID)
);

IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[MEMBERSHIP_EVENT_TABLE]') AND TYPE IN (N'U'))
CREATE TABLE MEMBERSHIP_EVENT_TABLE (
GROUP_ID VARCHAR (512) NOT NULL,
NODE_ID VARCHAR (512) NOT NULL,
GROUP_ID VARCHAR (450) NOT NULL,
NODE_ID VARCHAR (450) NOT NULL,
CHANGE_TYPE INT NOT NULL,
CHANGED_MEMBER_ID VARCHAR (512) NOT NULL
CHANGED_MEMBER_ID VARCHAR (450) NOT NULL
);

IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[REMOVED_MEMBERS_TABLE]') AND TYPE IN (N'U'))
CREATE TABLE REMOVED_MEMBERS_TABLE (
GROUP_ID VARCHAR (512) NOT NULL,
NODE_ID VARCHAR (512) NOT NULL,
REMOVED_MEMBER_ID VARCHAR (512) NOT NULL
GROUP_ID VARCHAR (450) NOT NULL,
NODE_ID VARCHAR (450) NOT NULL,
REMOVED_MEMBER_ID VARCHAR (450) NOT NULL
);

IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[COORDINATED_TASK_TABLE]') AND TYPE IN (N'U'))
CREATE TABLE COORDINATED_TASK_TABLE (
TASK_NAME VARCHAR (512) NOT NULL,
DESTINED_NODE_ID VARCHAR (512),
DESTINED_NODE_ID VARCHAR (450),
TASK_STATE VARCHAR (32),
PRIMARY KEY (TASK_NAME)
);
Loading