Finally finished the massive refactor... transitions still broke but it's fine for now.
This commit is contained in:
5
private/database/queries/create/CreateFormatsTable.sql
Normal file
5
private/database/queries/create/CreateFormatsTable.sql
Normal file
@ -0,0 +1,5 @@
|
||||
CREATE TABLE IF NOT EXISTS "Formats" (
|
||||
"id" BIGSERIAL NOT NULL PRIMARY KEY,
|
||||
"name" TEXT NOT NULL,
|
||||
"gameId" BIGSERIAL NOT NULL
|
||||
);
|
4
private/database/queries/create/CreateGamesTable.sql
Normal file
4
private/database/queries/create/CreateGamesTable.sql
Normal file
@ -0,0 +1,4 @@
|
||||
CREATE TABLE IF NOT EXISTS "Games" (
|
||||
"id" BIGSERIAL NOT NULL PRIMARY KEY,
|
||||
"name" TEXT NOT NULL UNIQUE
|
||||
);
|
7
private/database/queries/create/CreateSeasonsTable.sql
Normal file
7
private/database/queries/create/CreateSeasonsTable.sql
Normal file
@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS "Seasons" (
|
||||
"id" BIGSERIAL NOT NULL PRIMARY KEY,
|
||||
"name" TEXT NOT NULL,
|
||||
"formatId" BIGSERIAL NOT NULL,
|
||||
"startDate" TIMESTAMP NOT NULL,
|
||||
"endDate" TIMESTAMP NOT NULL
|
||||
);
|
@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS "TeamUsersSeasons" (
|
||||
"teamId" BIGSERIAL NOT NULL,
|
||||
"userId" BIGSERIAL NOT NULL,
|
||||
"seasonId" BIGSERIAL NOT NULL,
|
||||
"registered" TIMESTAMP NOT NULL,
|
||||
PRIMARY KEY("teamId", "userId", "seasonId")
|
||||
);
|
7
private/database/queries/create/CreateTeamsTable.sql
Normal file
7
private/database/queries/create/CreateTeamsTable.sql
Normal file
@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS "Teams" (
|
||||
"id" BIGSERIAL NOT NULL PRIMARY KEY,
|
||||
"name" varchar(32) NOT NULL UNIQUE,
|
||||
"motto" text NULL,
|
||||
"image" text NULL,
|
||||
"registered" TIMESTAMP NOT NULL
|
||||
);
|
6
private/database/queries/create/CreateUsersTable.sql
Normal file
6
private/database/queries/create/CreateUsersTable.sql
Normal file
@ -0,0 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS "Users" (
|
||||
"id" BIGSERIAL NOT NULL PRIMARY KEY,
|
||||
"discordId" text NULL UNIQUE,
|
||||
"steamId" text NULL UNIQUE,
|
||||
"email" text NULL UNIQUE
|
||||
);
|
Reference in New Issue
Block a user