-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/prisma/tripbot/migrations/20240219221538_welcome_fix/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- CreateTable | ||
CREATE TABLE "members" ( | ||
"id" TEXT NOT NULL, | ||
"guild_id" TEXT NOT NULL, | ||
"trusted" BOOLEAN NOT NULL DEFAULT false, | ||
|
||
CONSTRAINT "members_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "members_id_guildid_unique" ON "members"("id", "guild_id"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "members" ADD CONSTRAINT "members_id_foreign" FOREIGN KEY ("id") REFERENCES "users"("discord_id") ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "members" ADD CONSTRAINT "members_guildid_foreign" FOREIGN KEY ("guild_id") REFERENCES "discord_guilds"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; |