From fc362b340be4c19a04e43cdb40aba1d7578d6789 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 2 Dec 2020 22:21:35 +0200 Subject: [PATCH] Added fresh option to migrations --- application/controllers/Console.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/application/controllers/Console.php b/application/controllers/Console.php index 3fc51917..0b492e41 100644 --- a/application/controllers/Console.php +++ b/application/controllers/Console.php @@ -48,9 +48,16 @@ class Console extends EA_Controller { * Usage: * * php index.php console migrate + * + * @param string $type */ - public function migrate() + public function migrate($type = '') { + if ($type === 'fresh' && $this->migration->version(0) === FALSE) + { + show_error($this->migration->error_string()); + } + if ($this->migration->current() === FALSE) { show_error($this->migration->error_string());