Files
Synapsis/drizzle/0003_fix_bot_content_items_fk.sql
T
2026-01-26 08:34:48 +01:00

5 lines
330 B
SQL

-- Fix bot_content_items post_id foreign key to allow cascade on delete
ALTER TABLE "bot_content_items" DROP CONSTRAINT IF EXISTS "bot_content_items_post_id_posts_id_fk";
ALTER TABLE "bot_content_items" ADD CONSTRAINT "bot_content_items_post_id_posts_id_fk"
FOREIGN KEY ("post_id") REFERENCES "posts"("id") ON DELETE SET NULL;