]> git.mxchange.org Git - friendica.git/blob - util/db_update.php
"dba" is now a static class
[friendica.git] / util / db_update.php
1 <?php
2
3 /**
4  * @package util
5  */
6
7 use Friendica\App;
8
9 /*
10  * require boot.php
11  */
12 require_once("boot.php");
13
14 $a = new App(dirname(__DIR__));
15 @include(".htconfig.php");
16
17 $lang = get_browser_language();
18 load_translation_table($lang);
19
20 require_once("include/dba.php");
21 dba::connect($db_host, $db_user, $db_pass, $db_data, false);
22 unset($db_host, $db_user, $db_pass, $db_data);
23
24 $build = get_config('system', 'build');
25
26 echo "Old DB VERSION: " . $build . "\n";
27 echo "New DB VERSION: " . DB_UPDATE_VERSION . "\n";
28
29
30 if ($build != DB_UPDATE_VERSION) {
31         echo "Updating database...";
32         update_db($a);
33         echo "Done\n";
34 }