[Fusionforge-commits] FusionForge branch master updated. b41cb24df72a6f73a6400b7c8a562ef15a667c43

Roland Mas lolando at fusionforge.org
Mon Feb 11 09:30:09 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  b41cb24df72a6f73a6400b7c8a562ef15a667c43 (commit)
      from  fdacc913b8e0eb5e53bcf59253452966f5d8baf1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b41cb24df72a6f73a6400b7c8a562ef15a667c43
Author: Roland Mas <lolando at debian.org>
Date:   Mon Feb 11 09:30:02 2013 +0100

    Run all SQL scripts on plugin install

diff --git a/src/plugins/headermenu/bin/db-upgrade.pl b/src/plugins/headermenu/bin/db-upgrade.pl
index e77cd74..5086a24 100755
--- a/src/plugins/headermenu/bin/db-upgrade.pl
+++ b/src/plugins/headermenu/bin/db-upgrade.pl
@@ -52,7 +52,11 @@ eval {
     $version = &get_db_version ;
     $target = "0.1" ;
     if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
+	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql",
+			 "/usr/share/gforge/plugins/$pluginname/db/20120930-addoutermenusupport.sql",
+			 "/usr/share/gforge/plugins/$pluginname/db/20121231-reorderentry.sql",
+			 "/usr/share/gforge/plugins/$pluginname/db/20130120-addprojectcolumn.sql",
+	    ) ;
 	
 	foreach my $file (@filelist) {
 	    debug "Processing $file" ;
@@ -74,30 +78,6 @@ eval {
     }
     
     
-    $version = &get_db_version ;
-    $target = "0.2" ;
-    if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/20101203-add_type_for_iframe.sql" ) ;
-	
-	foreach my $file (@filelist) {
-	    debug "Processing $file" ;
-	    @reqlist = @{ &parse_sql_file ($file) } ;
-	    
-	    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 install/upgrade went well and smoothly.  That's cool." ;
     debug "Please enjoy using Debian GForge." ;
 

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/headermenu/bin/db-upgrade.pl |   30 +++++-------------------------
 1 file changed, 5 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list