Welcome Guest, Not a member yet? Register   Sign In
Suggested Migration strategy


I updated CI4 Database/MigrationRunner.php to fix all issues and add support migrations per module. The idea is to make the migration class supporting migration per module so that each module (Namespace) have it's own versioning sequence.

This will allow each module to be: added, updated, and deleted without affecting other modules. to explain the idea lets suppose that we have a website that we need to add a new chat module (migration number 9) to it and later we added a new blogging module to it (migration number 10).

After few months you decide to remove the chat module. With current migration strategy we can't use migration to delete the chat tables (9) as that we should first remove the blog tables (10). 

As with my current solution every module could have its own migration sequence this problem is solved.

Please find attached my suggested file update for more information.

Attached Files
.php   MigrationRunner.php (Size: 17.45 KB / Downloads: 107)

If you are proposing a change to the framework, this would be done through a pull request on https://github.com/bcit-ci/CodeIgniter4

I like the idea, but as ciadmin said - please provide it as a pull request.

Thank you I will provide a pull ... the code is already done and tested ...

please not that I found some issues in the code that is fixed with my version and I will explain all points in the pull Smile

Theme © iAndrew 2016 - Forum software by © MyBB