Added fresh option to migrations

This commit is contained in:
Alex Tselegidis 2020-12-02 22:21:35 +02:00
parent 9cde499f9a
commit fc362b340b

View file

@ -48,9 +48,16 @@ class Console extends EA_Controller {
* Usage: * Usage:
* *
* php index.php console migrate * 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) if ($this->migration->current() === FALSE)
{ {
show_error($this->migration->error_string()); show_error($this->migration->error_string());