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.57,1.58


From: cbayle
Subject: [Gforge-commits] gforge/deb-specific db-upgrade.pl,1.57,1.58
Date: Sun, 12 Sep 2004 18:17:42 -0500

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

Modified Files:
        db-upgrade.pl 
Log Message:
Added 20040804.sql and 20040826.sql


Index: db-upgrade.pl
===================================================================
RCS file: /cvsroot/gforge/gforge/deb-specific/db-upgrade.pl,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- db-upgrade.pl       29 Jul 2004 15:35:09 -0000      1.57
+++ db-upgrade.pl       12 Sep 2004 23:17:39 -0000      1.58
@@ -1571,6 +1571,46 @@
         $dbh->commit () ;
     }
 
+    $version = &get_db_version ;
+    $target = "3.3.0-0+6" ;
+    if (&is_lesser ($version, $target)) {
+        &debug ("Upgrading with 20040804.sql") ;
+
+        @reqlist = @{ &parse_sql_file ("/usr/lib/gforge/db/20040804.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+7" ;
+    if (&is_lesser ($version, $target)) {
+        &debug ("Upgrading with 20040826.sql") ;
+
+        @reqlist = @{ &parse_sql_file ("/usr/lib/gforge/db/20040826.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]