The Official Codeigniter userguide have a well written document about how to write a migration in codeigniter. But It missed one, “How run/execute the migration?”. I am not sure whether I missed or codeigniter did. But at last I found my own way to execute the migration and it works fine for me. I am not sure whether this is right way.
I create a controller named “migration” and added a index action to it. The index action will accept a parameter, version number.
Then I invoke the migration via browser.
For Eg: If I need to migrate to version number 10,
I use http://localhost/index.php/migrate/index/10 in browser.
I appreciate, if you can share a better way to execute migration in codeigniter.