Postpone new sectors to the next release so import previous sectors in the new
[platal.git] / upgrade / 1.0.0 / update.sh
CommitLineData
a90ca862
RB
1#!/bin/bash
2
3. ../inc/pervasive.sh
4
bb9d47f4
FB
5###########################################################
6[ "$DATABASE" != "x4dat" ] || die "Cannot target x4dat"
7
8confirm "Setting up new database: target db is \"$DATABASE\", source prefix is \"$DBPREFIX\""
9
01bb23e6 10echo "* create database"
652f22ee 11mysql_exec_nodb "CREATE DATABASE IF NOT EXISTS $DATABASE;"
bb9d47f4
FB
12echo "OK"
13
01bb23e6
RB
14echo "* copying tables "
15(../account/copy_tables.sh | while read line; do mysql_exec "$line"; done) || die "ERROR"
bb9d47f4
FB
16echo "OK"
17
18mysql_run_directory ../newdirectory-0.0.1
19mysql_run_directory ../account
20mysql_run_directory .
a90ca862
RB
21
22###########################################################
01bb23e6 23confirm "* Running upgrade scripts"
bb9d47f4
FB
24script_run ../newdirectory-0.0.1/phones.php
25script_run ../newdirectory-0.0.1/addresses.php
bb9d47f4 26script_run ../account/birthday.php