Skip to content

Commit 3285a59

Browse files
committed
feat: update schema
1 parent b9422c5 commit 3285a59

File tree

5 files changed

+821
-6
lines changed

5 files changed

+821
-6
lines changed

drizzle/0004_lush_jean_grey.sql

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
CREATE TABLE IF NOT EXISTS "gapless" (
2+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
3+
"guild_id" uuid,
4+
"client_id" text,
5+
"activated_by" text,
6+
"state" boolean DEFAULT false,
7+
"created_at" timestamp DEFAULT now() NOT NULL,
8+
"updated_at" timestamp NOT NULL
9+
);
10+
--> statement-breakpoint
11+
DO $$ BEGIN
12+
ALTER TABLE "gapless" ADD CONSTRAINT "gapless_guild_id_guild_id_fk" FOREIGN KEY ("guild_id") REFERENCES "public"."guild"("id") ON DELETE no action ON UPDATE no action;
13+
EXCEPTION
14+
WHEN duplicate_object THEN null;
15+
END $$;

0 commit comments

Comments
 (0)