(#2) Booster roles can now be linked to members.

Next steps:
 * Remove booster roles from the DB and Guild when someone stops
   boosting
 * Add booster roles to the DB and Guild when someone starts boosting

Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
This commit is contained in:
Louis Hollingworth 2023-06-18 12:34:31 +01:00
parent 6e1e54da1b
commit e8f797d1e0
Signed by: lucxjo
GPG key ID: A11415CB3DC7809B
7 changed files with 111 additions and 45 deletions

View file

@ -0,0 +1,26 @@
-- CreateTable
CREATE TABLE "guild" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"reports_channel_id" TEXT,
CONSTRAINT "guild_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "member" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"booster_role_id" TEXT NOT NULL,
CONSTRAINT "member_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "guild_id_key" ON "guild"("id");
-- CreateIndex
CREATE UNIQUE INDEX "member_id_key" ON "member"("id");
-- CreateIndex
CREATE UNIQUE INDEX "member_booster_role_id_key" ON "member"("booster_role_id");

View file

@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "postgresql"

View file

@ -12,3 +12,9 @@ model guild {
name String
reports_channel_id String?
}
model member {
id String @id @unique
name String
booster_role_id String @unique
}