diff --git a/application/controllers/Migrate.php b/application/controllers/Migrate.php index 012b23b..4ec42fd 100644 --- a/application/controllers/Migrate.php +++ b/application/controllers/Migrate.php @@ -13,7 +13,17 @@ class Migrate extends CI_Controller $this->load->library('migration'); } - public function index() + public function version($id = NULL) + { + if ($this->migration->version($id) === FALSE) + { + show_error($this->migration->error_string()); + } else { + echo "Database moved to: ".$id; + } + } + + public function latest() { if ($this->migration->latest() === FALSE) { @@ -21,7 +31,6 @@ class Migrate extends CI_Controller } else { echo "Database updated or update not needed."; } - } }