chore: generate drizzle migration for archived_at and auto_rules

This commit is contained in:
Leon Tonhäuser committed 2026-08-11 03:05:10 +02:00
1 parent fcd2a08cd0
commit 699580a6a0
3 files changed
+1773

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
CREATE TABLE "album_auto_rules" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"editorial_account_id" uuid NOT NULL,
"keyword" text NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"created_by_user_id" uuid
);
--> statement-breakpoint
ALTER TABLE "editorial_accounts" ADD COLUMN "archived_at" timestamp with time zone;--> statement-breakpoint
ALTER TABLE "editorial_accounts" ADD COLUMN "archived_by_user_id" uuid;--> statement-breakpoint
ALTER TABLE "album_auto_rules" ADD CONSTRAINT "album_auto_rules_editorial_account_id_editorial_accounts_id_fk" FOREIGN KEY ("editorial_account_id") REFERENCES "public"."editorial_accounts"("id") ON DELETE restrict ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "album_auto_rules" ADD CONSTRAINT "album_auto_rules_created_by_user_id_user_id_fk" FOREIGN KEY ("created_by_user_id") REFERENCES "public"."user"("id") ON DELETE restrict ON UPDATE no action;--> statement-breakpoint
CREATE UNIQUE INDEX "album_auto_rules_editorial_account_id_keyword_idx" ON "album_auto_rules" USING btree ("editorial_account_id",lower("keyword"));--> statement-breakpoint
ALTER TABLE "editorial_accounts" ADD CONSTRAINT "editorial_accounts_archived_by_user_id_user_id_fk" FOREIGN KEY ("archived_by_user_id") REFERENCES "public"."user"("id") ON DELETE restrict ON UPDATE no action;
File diff suppressed because it is too large. Load diff
+7
View File
@@ -43,6 +43,13 @@
"when": 1786379282947,
"tag": "0005_rate_limits",
"breakpoints": true
},
{
"idx": 6,
"version": "7",
"when": 1786410282719,
"tag": "0006_chubby_screwball",
"breakpoints": true
}
]
}