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

If you need to roll back, you have to use $this->migration->version(<VERSION>);
So in your case latest version is 2, and you need to go back to 1, you would call $this->migration->version(1);
It will automatically call "down" method from 002_do_step2.php.

I personally prefer "latest()" - that way I don't have to change $config['migration_version'] each time I need to migrate to a newer version.
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