[Fusionforge-commits] r7298 - trunk/gforge/deb-specific

Julien HEYMAN jheyman at libremir.placard.fr.eu.org
Thu Apr 2 16:28:35 CEST 2009


Author: jheyman
Date: 2009-04-02 16:28:35 +0200 (Thu, 02 Apr 2009)
New Revision: 7298

Modified:
   trunk/gforge/deb-specific/db-upgrade.pl
Log:
Drop unique index which are never unique

Modified: trunk/gforge/deb-specific/db-upgrade.pl
===================================================================
--- trunk/gforge/deb-specific/db-upgrade.pl	2009-04-02 14:21:44 UTC (rev 7297)
+++ trunk/gforge/deb-specific/db-upgrade.pl	2009-04-02 14:28:35 UTC (rev 7298)
@@ -2801,6 +2801,24 @@
         $dbh->commit () ;
     }
 
+    $version = &get_db_version ;
+    $target = "4.6.99-6" ;
+    if (&is_lesser ($version, $target)) {
+      &debug ("DROP UNIQUE INDEX never UNIQUE") ;
+      &drop_index_if_exists ($dbh, "statsaggsitebygrp_oid") ;
+      &drop_index_if_exists ($dbh, "statsprojectmetric_oid") ;
+      &drop_index_if_exists ($dbh, "statsagglogobygrp_oid") ;
+      &drop_index_if_exists ($dbh, "statsprojectdevelop_oid") ;
+      &drop_index_if_exists ($dbh, "statssubdpages_oid") ;
+      &drop_index_if_exists ($dbh, "statscvsgrp_oid") ;
+      &drop_index_if_exists ($dbh, "statsproject_oid") ;
+      &drop_index_if_exists ($dbh, "statssite_oid") ;
+      &drop_index_if_exists ($dbh, "statssitepgsbyday_oid") ;
+      &update_db_version ($target) ;
+      &debug ("Committing.") ;
+      $dbh->commit () ;
+    }
+
     ########################### INSERT HERE #################################
 
     &debug ("It seems your database $action went well and smoothly. That's cool.") ;




More information about the Fusionforge-commits mailing list