From 17e68c972699ca0993a1d89ce3769edab1ca5e01 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 23 Feb 2022 11:29:45 +0100 Subject: [PATCH] Switch to go-to-latest database migration configuration for simplicity (#1213) --- application/config/migration.php | 2 +- application/controllers/Backend.php | 2 +- application/controllers/Console.php | 2 +- application/controllers/Installation.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/config/migration.php b/application/config/migration.php index b2d763b4..c722db45 100755 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE; | be upgraded / downgraded to. | */ -$config['migration_version'] = 21; +$config['migration_version'] = 0; /* diff --git a/application/controllers/Backend.php b/application/controllers/Backend.php index 85cddc8a..7144fe5c 100755 --- a/application/controllers/Backend.php +++ b/application/controllers/Backend.php @@ -351,7 +351,7 @@ class Backend extends EA_Controller { throw new Exception('You do not have the required privileges for this task!'); } - if ( ! $this->migration->current()) + if ( ! $this->migration->latest()) { throw new Exception($this->migration->error_string()); } diff --git a/application/controllers/Console.php b/application/controllers/Console.php index b2acee33..6550e766 100644 --- a/application/controllers/Console.php +++ b/application/controllers/Console.php @@ -82,7 +82,7 @@ class Console extends EA_Controller { show_error($this->migration->error_string()); } - if ($this->migration->current() === FALSE) + if ($this->migration->latest() === FALSE) { show_error($this->migration->error_string()); } diff --git a/application/controllers/Installation.php b/application/controllers/Installation.php index c6ccd3aa..172dbb11 100644 --- a/application/controllers/Installation.php +++ b/application/controllers/Installation.php @@ -66,7 +66,7 @@ class Installation extends EA_Controller { $admin = $this->input->post('admin'); $company = $this->input->post('company'); - if ( ! $this->migration->current()) + if ( ! $this->migration->latest()) { throw new Exception($this->migration->error_string()); }