Browse Source

add db_update cmdline script

pull/27/head
friendica 9 years ago
parent
commit
e9fb809a2d
1 changed files with 26 additions and 0 deletions
  1. +26
    -0
      util/db_update.php

+ 26
- 0
util/db_update.php View 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…
Cancel
Save