holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r21974: LJSUP-12225: Two identical account

Committer: akanashin
LJSUP-12225: Two identical account
U   trunk/bin/upgrading/update-db-general.pl
Modified: trunk/bin/upgrading/update-db-general.pl
===================================================================
--- trunk/bin/upgrading/update-db-general.pl	2012-05-16 11:04:03 UTC (rev 21973)
+++ trunk/bin/upgrading/update-db-general.pl	2012-05-16 13:51:29 UTC (rev 21974)
@@ -552,6 +552,7 @@
   `type` char(5) default NULL,
   `name` char(80) default NULL,
   PRIMARY KEY  (`domainid`),
+  UNIQUE KEY `domain` (`domain`),
   KEY `userid` (`userid`),
   KEY `rcptid` (`userid`)
 )
@@ -4455,6 +4456,11 @@
             do_alter("domains", "ALTER TABLE domains ADD COLUMN type char(5)");
             do_alter("domains", "ALTER TABLE domains ADD COLUMN name char(80)");
     }
+
+    unless (index_name("domains", "UNIQUE:domain")) {
+        do_alter("domains", "ALTER TABLE domains ADD UNIQUE (domain)");
+    }
+
 });
 
 register_alter(sub {

Tags: akanashin, holyandrew, livejournal, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments