Welcome Guest, Not a member yet? Register   Sign In
Migrations - very confusing
#1

(This post was last modified: 02-05-2016, 08:55 AM by Wouter60.)

In my application/config/migration.php file, I have the following settings:
PHP Code:
$config['migration_enabled'] = TRUE;
$config['migration_type'] = 'sequential';
$config['migration_table'] = 'migrations';
$config['migration_auto_latest'] = FALSE;
$config['migration_version'] = 0;
$config['migration_path'] = APPPATH.'migrations/'

Now, in my applicatons/migrations folder I have 2 files:
001_do_step1.php
002_do_step2.php

Migration step 001 has already run, it adds a field to one of my tables in the database.
Now I want to add another field, so I try to run the migration for step 2:

migrate/do_migration/002

However, I get the error that I try to add a duplicate field,

Code:
Error Number: 1060
Duplicate column name 'field1'
ALTER TABLE `table1` ADD `field1` TINYINT(1) NOT NULL DEFAULT 0
Filename: ./application/migrations/001_do_step1.php
Line Number: 24

Why doesn't it migrate using the file that starts with 002 ???
Reply


Messages In This Thread
Migrations - very confusing - by Wouter60 - 02-05-2016, 08:53 AM
RE: Migrations - very confusing - by keulu - 02-05-2016, 09:03 AM
RE: Migrations - very confusing - by Wouter60 - 02-05-2016, 09:17 AM
RE: Migrations - very confusing - by keulu - 02-05-2016, 09:23 AM
RE: Migrations - very confusing - by keulu - 02-05-2016, 09:24 AM
RE: Migrations - very confusing - by Wouter60 - 02-05-2016, 02:21 PM
RE: Migrations - very confusing - by siburny - 02-09-2016, 03:35 PM
RE: Migrations - very confusing - by siburny - 02-09-2016, 03:40 PM
RE: Migrations - very confusing - by LexXx - 05-31-2016, 12:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB