Update readme.
[platal.git] / upgrade / 1.0.0 / update.sh
1 #!/bin/bash
2
3 . ../inc/pervasive.sh
4
5 ###########################################################
6 [ "$DATABASE" != "x4dat" ] || die "Cannot target x4dat"
7
8 confirm "Setting up new database: target db is \"$DATABASE\", source prefix is \"$DBPREFIX\""
9
10 echo -n "* create database "
11 (echo "CREATE DATABASE IF NOT EXISTS $DATABASE;" | mysql_pipe) || die "ERROR"
12 echo "OK"
13
14 echo -n "* copying tables "
15 (../account/copy_tables.sh | mysql_pipe) || die "ERROR"
16 echo "OK"
17
18 mysql_run_directory ../newdirectory-0.0.1
19 mysql_run_directory ../account
20 mysql_run_directory .
21
22 ###########################################################
23 confirm "Running upgrade scripts"
24 script_run ../newdirectory-0.0.1/phones.php
25 script_run ../newdirectory-0.0.1/addresses.php
26 script_run ../newdirectory-0.0.1/alternate_subsubsectors.php
27 script_run ../account/birthday.php