[Fusionforge-commits] r11852 - branches/Branch_5_1/src/plugins/extratabs/bin

Roland Mas lolando at libremir.placard.fr.eu.org
Mon Dec 20 15:44:30 CET 2010


Author: lolando
Date: 2010-12-20 15:44:29 +0100 (Mon, 20 Dec 2010)
New Revision: 11852

Modified:
   branches/Branch_5_1/src/plugins/extratabs/bin/db-upgrade.pl
Log:
Run DB upgrade snippet for extratabs plugin

Modified: branches/Branch_5_1/src/plugins/extratabs/bin/db-upgrade.pl
===================================================================
--- branches/Branch_5_1/src/plugins/extratabs/bin/db-upgrade.pl	2010-12-20 14:41:19 UTC (rev 11851)
+++ branches/Branch_5_1/src/plugins/extratabs/bin/db-upgrade.pl	2010-12-20 14:44:29 UTC (rev 11852)
@@ -73,6 +73,31 @@
 	$dbh->commit () ;
     }
     
+    
+    $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." ;
 




More information about the Fusionforge-commits mailing list