mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
add db_update cmdline script
This commit is contained in:
parent
e1e6d2fa3e
commit
e9fb809a2d
1 changed files with 26 additions and 0 deletions
26
util/db_update.php
Normal file
26
util/db_update.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
require_once("boot.php");
|
||||
|
||||
$a = new App;
|
||||
@include(".htconfig.php");
|
||||
|
||||
$lang = get_language();
|
||||
load_translation_table($lang);
|
||||
|
||||
require_once("dba.php");
|
||||
$db = new dba($db_host, $db_user, $db_pass, $db_data, false);
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
|
||||
$build = get_config('system','build');
|
||||
|
||||
echo "Old DB VERSION: " . $build . "\n";
|
||||
echo "New DB VERSION: " . DB_UPDATE_VERSION . "\n";
|
||||
|
||||
|
||||
if($build != DB_UPDATE_VERSION) {
|
||||
echo "Updating database...";
|
||||
check_config();
|
||||
echo "Done\n";
|
||||
}
|
||||
|
Loading…
Reference in a new issue