fix: soft delete labels

This commit is contained in:
Henry
2025-05-27 21:49:01 +01:00
parent 09211e60c7
commit 59eadfc694
8 changed files with 2131 additions and 5 deletions

View File

@@ -0,0 +1,7 @@
ALTER TABLE "label" ADD COLUMN "deletedAt" timestamp;--> statement-breakpoint
ALTER TABLE "label" ADD COLUMN "deletedBy" uuid;--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "label" ADD CONSTRAINT "label_deletedBy_user_id_fk" FOREIGN KEY ("deletedBy") REFERENCES "public"."user"("id") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;