EllisLab/CodeIgniter — Issue #1031: Migrations questions
Author: ikatsuke
Created: 2012-02-12 04:33:11+00:00
State: open

Hi, I was starting to move from my current form of migrations to using CI's implementation. But i found that currently there are a couple of things that prevent me from doing so.

1 There is no way to obtain the current migration from a controller/model/library

The visibility of the function _get_version() is protected. Other than building a query for every application that is. I use this to implement features in my applications and deploy them at a later date. Say I add a news banner that requires a DB table to store the headings. I'd like to be able to ensure that if the database has not been migrated (current version is lower than target version) the feature is invisible to the end user even if the code has been updated to the latest revision.

2 Extending the Migrations library requires me to duplicate the constructor

For some reason, there is a bit of code that prevents re-using the constructor of the migrations class.

```php