Permalink
Browse files

theme locks should cascade on delete

  • Loading branch information...
1 parent 07aba93 commit 838f5f1b030d816cacd5142ea075f9bfd3020d2a @cvan cvan committed Mar 11, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 migrations/549-cascade-theme-locks.sql
@@ -0,0 +1,7 @@
+ALTER TABLE `theme_locks` DROP FOREIGN KEY `reviewer_id_refs_id_6928eea4`;
+ALTER TABLE `theme_locks` DROP FOREIGN KEY `theme_id_refs_id_3202bbda`;
+
+ALTER TABLE `theme_locks` ADD CONSTRAINT `reviewer_id_refs_id_fk`
+ FOREIGN KEY (`reviewer_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
+ALTER TABLE `theme_locks` ADD CONSTRAINT `theme_id_refs_id_fk`
+ FOREIGN KEY (`theme_id`) REFERENCES `personas` (`id`) ON DELETE CASCADE;

0 comments on commit 838f5f1

Please sign in to comment.