Browse Source

Database migration to lower and higher versions.

master
Rogier Neeleman 8 years ago
parent
commit
481d6990e4
  1. 13
      application/controllers/Migrate.php

13
application/controllers/Migrate.php

@ -13,7 +13,17 @@ class Migrate extends CI_Controller @@ -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 @@ -21,7 +31,6 @@ class Migrate extends CI_Controller
} else {
echo "Database updated or update not needed.";
}
}
}

Loading…
Cancel
Save