Skip to content

Commit

Permalink
feat: update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi committed Jun 2, 2024
1 parent b9422c5 commit 3285a59
Show file tree
Hide file tree
Showing 5 changed files with 821 additions and 6 deletions.
15 changes: 15 additions & 0 deletions drizzle/0004_lush_jean_grey.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE TABLE IF NOT EXISTS "gapless" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"guild_id" uuid,
"client_id" text,
"activated_by" text,
"state" boolean DEFAULT false,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp NOT NULL
);
--> statement-breakpoint
DO $$ BEGIN
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;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
Loading

0 comments on commit 3285a59

Please sign in to comment.