Finally finished the massive refactor... transitions still broke but it's fine for now.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
CREATE TABLE IF NOT EXISTS "Formats" (
|
||||
"id" BIGSERIAL NOT NULL PRIMARY KEY,
|
||||
"name" TEXT NOT NULL,
|
||||
"gameId" BIGSERIAL NOT NULL
|
||||
);
|
||||
@@ -0,0 +1,4 @@
|
||||
CREATE TABLE IF NOT EXISTS "Games" (
|
||||
"id" BIGSERIAL NOT NULL PRIMARY KEY,
|
||||
"name" TEXT NOT NULL UNIQUE
|
||||
);
|
||||
@@ -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")
|
||||
);
|
||||
@@ -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
|
||||
);
|
||||
@@ -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