Yi EungJun 2015-04-01
Add missing unique constraint for original_email
@56ac0ee64f4667ca0bb89fd6e1898b6bded18620
 
conf/evolutions/default/99.sql (added)
+++ conf/evolutions/default/99.sql
@@ -0,0 +1,9 @@
+# --- !Ups
+
+delete from original_email a where a.id > any (select b.id from original_email b where a.message_id = b.message_id);
+
+alter table original_email add constraint uq_original_email_2 unique (message_id);
+
+# --- !Downs
+
+alter table original_email drop constraint if exists uq_original_email_2;
Add a comment
List