Thanks for the reply. The core migration code doesn't "break", but it still can "fail" in the sense of a SQL error or some custom validation code.
The code the core uses is (in the version() function):
PHP Code:
$migration[0] = new $migration[0];
call_user_func($migration);
$current_version = $number;
$this->_update_version($current_version);
So the "_update_version" function runs without any checks on call_user_func to see the result returned. If it checked the response from the user migration function, I could return false and it would leave the DB version untouched.
Alternatively, if there was a way to disable the "update version" portion of the code and allow me to handle it manually, that'd work too.
The reason I need this is I'm creating a custom CLI utility for my app which will migrate all accounts (I have a multi-DB setup, with a master DB and multiple client DBs).
And one other thing which I can't figure out - how to get the "target version" from CI_Migration. It'd be handy to be able to pull the current migration it's up to in the loop, as my utility reports "Upgrading to version 201605......" as it goes through and updates master and client DBs.
I don't think the target version is stored in the object anywhere, but it'd be useful if it was.
Thanks for your time.