Added fresh option to migrations

This commit is contained in:
Alex Tselegidis 2020-12-02 22:21:35 +02:00
parent 9cde499f9a
commit fc362b340b
1 changed files with 8 additions and 1 deletions

View File

@ -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());