2023-06-18 11:34:31 +00:00
|
|
|
-- 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" (
|
2023-06-18 13:05:21 +00:00
|
|
|
"id" UUID NOT NULL DEFAULT gen_random_uuid(),
|
2023-06-18 11:34:31 +00:00
|
|
|
"name" TEXT NOT NULL,
|
2023-06-18 13:05:21 +00:00
|
|
|
"booster_role_id" TEXT,
|
|
|
|
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
"dgid" TEXT NOT NULL,
|
|
|
|
"duid" TEXT NOT NULL,
|
2023-06-18 11:34:31 +00:00
|
|
|
|
|
|
|
CONSTRAINT "member_pkey" PRIMARY KEY ("id")
|
|
|
|
);
|
|
|
|
|
|
|
|
-- CreateIndex
|
|
|
|
CREATE UNIQUE INDEX "guild_id_key" ON "guild"("id");
|
|
|
|
|
|
|
|
-- CreateIndex
|
2023-06-18 13:05:21 +00:00
|
|
|
CREATE UNIQUE INDEX "member_dgid_duid_key" ON "member"("dgid", "duid");
|