Welcome Guest, Not a member yet? Register   Sign In
Migration - changing column name does not work
#1

[eluser]Cgull[/eluser]
Hello,

I am trying to use migration on a site I have.

My controller:
Code:
class Migration extends Admin_Controller
{

public function __construct ()
{
  parent::__construct();
}

public function index ()
{
  $this->load->library('migration');
  if (! $this->migration->current()) {
   show_error($this->migration->error_string());
  }
  else {
   echo 'Migration worked!';
  }

}
}

My migration application/migrations/007_update_issues.php:
Code:
class Migration_Update_issues extends CI_Migration
{
public function up()
{
  $fields = array(
               'from_date' => array(
                'name' => 'issue_date',
                'type' => 'DATE',
              )
  );
  $this->dbforge->modify_column('issues', $fields);
}
}

In my migrations table the value is 7

My config: application/config/migration.php:
Code:
$config['migration_enabled'] = TRUE;
$config['migration_version'] = 7;

When I run mysite/admin/migration I get the message: Migration worked!

But the table was not changed.

Why is that?




Theme © iAndrew 2016 - Forum software by © MyBB