]> git.mxchange.org Git - friendica.git/commitdiff
add db_update cmdline script
authorfriendica <info@friendica.com>
Sun, 15 Jan 2012 23:02:48 +0000 (15:02 -0800)
committerfriendica <info@friendica.com>
Sun, 15 Jan 2012 23:02:48 +0000 (15:02 -0800)
util/db_update.php [new file with mode: 0644]

diff --git a/util/db_update.php b/util/db_update.php
new file mode 100644 (file)
index 0000000..1da2a99
--- /dev/null
@@ -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";
+}
+