Add SQLx migrations

Members, PendingMembers and ManualMembers in members, pending and manual tables
This commit is contained in:
Aadi Desai 2023-09-23 23:00:34 +01:00
parent 944a950724
commit 5b20f1318f
Signed by: supleed2
SSH key fingerprint: SHA256:CkbNRs0yVzXEiUp2zd0PSxsfRUMFF9bLlKXtE1xEbKM
3 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS "members" (
"discord_id" BIGINT NOT NULL PRIMARY KEY,
"shortcode" VARCHAR(16) NOT NULL CONSTRAINT "users_shortcode_unique" UNIQUE,
"nickname" TEXT NOT NULL,
"realname" TEXT NOT NULL,
"fresher" BOOLEAN NOT NULL
)

View file

@ -0,0 +1,5 @@
CREATE TABLE IF NOT EXISTS "pending" (
"discord_id" BIGINT NOT NULL PRIMARY KEY,
"shortcode" VARCHAR(16) NOT NULL,
"realname" TEXT NOT NULL
)

View file

@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS "manual" (
"discord_id" BIGINT NOT NULL PRIMARY KEY,
"shortcode" VARCHAR(16) NOT NULL,
"nickname" TEXT NOT NULL,
"realname" TEXT NOT NULL,
"fresher" BOOLEAN NOT NULL
)