I am using Codeigniter 3 with many migration files like 001_
, 002_
etc.
Settings in config/migration.php
are:
$config['migration_type'] = 'sequential';
$config['migration_table'] = 'migrations';
$config['migration_auto_latest'] = TRUE;
$config['migration_version'] = '001';
$config['migration_path'] = APPPATH.'migrations/';
and code in the Controller:
public function index(){
$this->load->library('migration');
if($this->migration->current()){
echo 'done !';
} else {
show_error($this->migration->error_string());
}
}
, but when I access the URL /migrate
, I see this error:
A Database Error Occurred
Error Number: 1146
Table '{database}.migrations' doesn't exist
SELECT
version
FROMmigrations
Filename: libraries/Migration.php
Line Number: 414
I used migration from CI3 and before and I know I do not need to create table for migrations, manual, but when you run migrations CI3 do it. Where is the problem ?