gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/deb-specific db-upgrade.pl,1.62,1.63


From: cbayle
Subject: [Gforge-commits] gforge/deb-specific db-upgrade.pl,1.62,1.63
Date: Mon, 25 Oct 2004 09:36:58 -0500

Update of /cvsroot/gforge/gforge/deb-specific
In directory db.perdue.net:/tmp/cvs-serv13461/deb-specific

Modified Files:
        db-upgrade.pl 
Log Message:
Update sql calls


Index: db-upgrade.pl
===================================================================
RCS file: /cvsroot/gforge/gforge/deb-specific/db-upgrade.pl,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- db-upgrade.pl       8 Oct 2004 21:13:03 -0000       1.62
+++ db-upgrade.pl       25 Oct 2004 14:36:55 -0000      1.63
@@ -1552,26 +1552,6 @@
     }
 
     $version = &get_db_version ;
-    $target = "3.3.0-0+5" ;
-    if (&is_lesser ($version, $target)) {
-        &debug ("Upgrading with 20040729.sql") ;
-
-        @reqlist = @{ &parse_sql_file ("/usr/lib/gforge/db/20040729.sql") } ;
-        foreach my $s (@reqlist) {
-            $query = $s ;
-            # debug $query ;
-            $sth = $dbh->prepare ($query) ;
-            $sth->execute () ;
-            $sth->finish () ;
-        }
-        @reqlist = () ;
-
-        &update_db_version ($target) ;
-        &debug ("Committing.") ;
-        $dbh->commit () ;
-    }
-
-    $version = &get_db_version ;
     $target = "3.3.0-0+6" ;
     if (&is_lesser ($version, $target)) {
         &debug ("Upgrading with 20040804.sql") ;
@@ -1713,6 +1693,68 @@
         $dbh->commit () ;
     }
 
+    $version = &get_db_version ;
+    $target = "3.3.0-3" ;
+    if (&is_lesser ($version, $target)) {
+        &debug ("Upgrading with 20041014.sql") ;
+
+        @reqlist = @{ &parse_sql_file ("/usr/lib/gforge/db/20041014.sql") } ;
+        foreach my $s (@reqlist) {
+            $query = $s ;
+            # debug $query ;
+            $sth = $dbh->prepare ($query) ;
+            $sth->execute () ;
+            $sth->finish () ;
+        }
+        @reqlist = () ;
+
+        &update_db_version ($target) ;
+        &debug ("Committing.") ;
+        $dbh->commit () ;
+    }
+
+    $version = &get_db_version ;
+    $target = "3.3.0-4" ;
+    if (&is_lesser ($version, $target)) {
+        &debug ("Upgrading with 20041020.sql") ;
+
+        @reqlist = @{ &parse_sql_file ("/usr/lib/gforge/db/20041020.sql") } ;
+        foreach my $s (@reqlist) {
+            $query = $s ;
+            # debug $query ;
+            $sth = $dbh->prepare ($query) ;
+            $sth->execute () ;
+            $sth->finish () ;
+        }
+        @reqlist = () ;
+
+        &update_db_version ($target) ;
+        &debug ("Committing.") ;
+        $dbh->commit () ;
+    }
+
+    $version = &get_db_version ;
+    $target = "4.0.0-0" ;
+    # This is an exception, I reapply a modified version of 20040729.sql since 
it was doing nothing
+    # the other call was deleted from this file
+    if (&is_lesser ($version, $target)) {
+        &debug ("Upgrading with 20040729.sql") ;
+
+        @reqlist = @{ &parse_sql_file ("/usr/lib/gforge/db/20040729.sql") } ;
+        foreach my $s (@reqlist) {
+            $query = $s ;
+            # debug $query ;
+            $sth = $dbh->prepare ($query) ;
+            $sth->execute () ;
+            $sth->finish () ;
+        }
+        @reqlist = () ;
+
+        &update_db_version ($target) ;
+        &debug ("Committing.") ;
+        $dbh->commit () ;
+    }
+
 
     &debug ("It seems your database $action went well and smoothly.  That's 
cool.") ;
     &debug ("Please enjoy using Gforge.") ;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]