[Fusionforge-commits] r7311 - in trunk/gforge: db deb-specific install

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Apr 2 22:23:33 CEST 2009


Author: lolando
Date: 2009-04-02 22:23:33 +0200 (Thu, 02 Apr 2009)
New Revision: 7311

Added:
   trunk/gforge/db/20090402-add-projecttags-constraints.sql
Modified:
   trunk/gforge/deb-specific/db-upgrade.pl
   trunk/gforge/install/db-postgresql
Log:
Fixes to the project_tags table

Added: trunk/gforge/db/20090402-add-projecttags-constraints.sql
===================================================================
--- trunk/gforge/db/20090402-add-projecttags-constraints.sql	                        (rev 0)
+++ trunk/gforge/db/20090402-add-projecttags-constraints.sql	2009-04-02 20:23:33 UTC (rev 7311)
@@ -0,0 +1,2 @@
+ALTER TABLE project_tags ALTER COLUMN name SET DEFAULT '' ;
+ALTER TABLE project_tags ADD FOREIGN KEY (group_id) REFERENCES groups (group_id) MATCH FULL;

Modified: trunk/gforge/deb-specific/db-upgrade.pl
===================================================================
--- trunk/gforge/deb-specific/db-upgrade.pl	2009-04-02 19:53:41 UTC (rev 7310)
+++ trunk/gforge/deb-specific/db-upgrade.pl	2009-04-02 20:23:33 UTC (rev 7311)
@@ -2818,17 +2818,10 @@
       &debug ("Committing.") ;
       $dbh->commit () ;
     }
+    
+    &update_with_sql("20090327_create_table_project_tags","4.6.99-7");
+    &update_with_sql("20090402-add-projecttags-constraints","4.7.99-1");
 
-    $version = &get_db_version ;
-    $target = "4.6.99-7" ;
-    if (&is_lesser ($version, $target)) {
-      &debug ("Create table for project's tags") ;
-      &update_with_sql("20090327_create_table_project_tags.sql","4.6.99-7");
-      &update_db_version ($target) ;
-      &debug ("Committing.") ;
-      $dbh->commit () ;
-    }
-
     ########################### INSERT HERE #################################
 
     &debug ("It seems your database $action went well and smoothly. That's cool.") ;

Modified: trunk/gforge/install/db-postgresql
===================================================================
--- trunk/gforge/install/db-postgresql	2009-04-02 19:53:41 UTC (rev 7310)
+++ trunk/gforge/install/db-postgresql	2009-04-02 20:23:33 UTC (rev 7311)
@@ -51,3 +51,5 @@
 db/20070924-forum-perm.sql              usr/share/gforge/db/
 db/20070924-project-perm.sql            usr/share/gforge/db/
 db/20070924-artifact-perm.sql           usr/share/gforge/db/
+db/20090327_create_table_project_tags.sql     usr/share/gforge/db/
+db/20090402-add-projecttags-constraints.sql   usr/share/gforge/db/




More information about the Fusionforge-commits mailing list