Files
lehuo/apps/api/prisma/migrations/20260812173000_phase7_fk_names/migration.sql
T
2026-08-12 14:35:12 +08:00

6 lines
494 B
SQL

ALTER TABLE `content_post_status_history`
DROP FOREIGN KEY `content_status_history_post_fkey`,
DROP FOREIGN KEY `content_status_history_operator_fkey`,
ADD CONSTRAINT `content_post_status_history_content_post_id_fkey` FOREIGN KEY (`content_post_id`) REFERENCES `content_posts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
ADD CONSTRAINT `content_post_status_history_operator_user_id_fkey` FOREIGN KEY (`operator_user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;