added database versioning
This commit is contained in:
+8
-3
@@ -12,11 +12,16 @@
|
||||
* Tables must be updated manually, see htdocs/doc/sql/db-changes.txt
|
||||
*/
|
||||
|
||||
$rootpath = dirname(__FILE__) . '/../htdocs/';
|
||||
require($rootpath . 'lib/settings.inc.php');
|
||||
$rootpath = $opt['rootpath'] = dirname(__FILE__) . '/../htdocs/';
|
||||
chdir($rootpath);
|
||||
require_once('lib2/cli.inc.php');
|
||||
|
||||
echo "importing data.sql ...\n";
|
||||
system('cat ' . $rootpath . 'doc/sql/static-data/data.sql | mysql -h' . $dbserver . ' -u' . $dbusername . ' --password=' . $dbpasswd . ' ' . $dbname);
|
||||
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 "updating db structure ...\n";
|
||||
require('dbsv-update.php');
|
||||
|
||||
echo "importing triggers ...\n";
|
||||
chdir ($rootpath . 'doc/sql/stored-proc');
|
||||
|
||||
Reference in New Issue
Block a user