diff --git a/bin/dbsv-update.php b/bin/dbsv-update.php index 60e28c2d..1629f28b 100644 --- a/bin/dbsv-update.php +++ b/bin/dbsv-update.php @@ -8,6 +8,10 @@ /* * Database Structure Versioning - update DB structure to current version; * used for developer & production system + * + * You should normally NOT call this script directly, but via dbupdate.php + * (or something similar on a production system). This ensures that + * everything takes place in the right order. */ if (!isset($opt['rootpath'])) diff --git a/bin/dbupdate.php b/bin/dbupdate.php index 3367a5bd..ff4ef779 100644 --- a/bin/dbupdate.php +++ b/bin/dbupdate.php @@ -14,19 +14,22 @@ chdir($rootpath); require_once('lib2/cli.inc.php'); - echo "updating db structure ...\n"; + echo "updating db structure\n"; require('dbsv-update.php'); - echo "importing data.sql ...\n"; + echo "importing data.sql\n"; system('cat ' . $rootpath . 'doc/sql/static-data/data.sql |' . ' mysql -h' . $opt['db']['servername'] . ' -u' . $opt['db']['username'] . ' --password=' . $opt['db']['password'] . ' ' . $opt['db']['placeholder']['db']); - echo "importing triggers ...\n"; + echo "importing triggers\n"; chdir ($rootpath . 'doc/sql/stored-proc'); system('php maintain.php'); - echo "resettings webcache ...\n"; + echo "updating OKAPI database\n"; chdir ($rootpath . '../bin'); + system('php okapi-update.php | grep -i -e mutation'); + + echo "resetting webcache:\n"; system('php clear-webcache.php'); ?> \ No newline at end of file diff --git a/bin/okapi-update.php b/bin/okapi-update.php new file mode 100644 index 00000000..7ecf5123 --- /dev/null +++ b/bin/okapi-update.php @@ -0,0 +1,27 @@ + \ No newline at end of file