summaryrefslogtreecommitdiffstats
path: root/application/controllers/tools.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/tools.php')
-rw-r--r--application/controllers/tools.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/application/controllers/tools.php b/application/controllers/tools.php
index c3209e8f7..9e0ddfb5f 100644
--- a/application/controllers/tools.php
+++ b/application/controllers/tools.php
@@ -36,9 +36,18 @@ class Tools extends MY_Controller {
function update_database()
{
$this->load->library('migration');
- if ( ! $this->migration->current()) {
+ $upgraded = $this->migration->current();
+ if ( ! $upgraded) {
throw new \exceptions\ApiException("tools/update_database/migration-error", $this->migration->error_string());
}
+
+ if ($upgraded === true) {
+ echo "Already at latest database version. No upgrade performed\n";
+ }
+
+ if (is_int($upgraded)) {
+ echo "Database upgraded sucessfully to version: $upgraded\n";
+ }
}
function drop_all_tables()