Upgrade master is upgrade/1.0.0
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 1 Jun 2010 12:45:39 +0000 (14:45 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 1 Jun 2010 13:01:10 +0000 (15:01 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
upgrade/1.0.0/update.sh
upgrade/account/update.sh [deleted file]

index 928d1e4..3c3a41e 100755 (executable)
@@ -2,14 +2,26 @@
 
 . ../inc/pervasive.sh
 
-mailman_stop
-mailman_templates
-mailman_start
+###########################################################
+[ "$DATABASE" != "x4dat" ] || die "Cannot target x4dat"
+
+confirm "Setting up new database: target db is \"$DATABASE\", source prefix is \"$DBPREFIX\""
+
+echo -n "* create database "
+(echo "CREATE DATABASE IF NOT EXISTS $DATABASE;" | mysql_pipe) || die "ERROR"
+echo "OK"
+
+echo -n "* copying tables "
+(../account/copy_tables.sh | mysql_pipe) || die "ERROR"
+echo "OK"
+
+mysql_run_directory ../newdirectory-0.0.1
+mysql_run_directory ../account
+mysql_run_directory .
 
 ###########################################################
-for sql in *.sql
-do
-    echo -n $sql
-    $MYSQL $DATABASE < $sql &>/dev/null || echo -n " ERROR"
-    echo .
-done
+confirm "Running upgrade scripts"
+script_run ../newdirectory-0.0.1/phones.php
+script_run ../newdirectory-0.0.1/addresses.php
+script_run ../newdirectory-0.0.1/alternate_subsubsectors.php
+script_run ../account/birthday.php
diff --git a/upgrade/account/update.sh b/upgrade/account/update.sh
deleted file mode 100755 (executable)
index b7ec73e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-. ../inc/pervasive.sh
-
-###########################################################
-[ "$DATABASE" != "x4dat" ] || die "Cannot target x4dat"
-
-confirm "Setting up new database: target db is \"$DATABASE\", source prefix is \"$DBPREFIX\""
-
-echo -n "* create database "
-(echo "CREATE DATABASE IF NOT EXISTS $DATABASE;" | mysql_pipe) || die "ERROR"
-echo "OK"
-
-echo -n "* copying tables "
-(./copy_tables.sh | mysql_pipe) || die "ERROR"
-echo "OK"
-
-mysql_run_directory ../newdirectory-0.0.1
-mysql_run_directory .
-
-###########################################################
-confirm "Running upgrade scripts"
-script_run ../newdirectory-0.0.1/phones.php
-script_run ../newdirectory-0.0.1/addresses.php
-script_run ../newdirectory-0.0.1/alternate_subsubsectors.php
-script_run ./birthday.php