• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggested Migration strategy

#1
Hi,

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: 33)
Reply

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

#3
I like the idea, but as ciadmin said - please provide it as a pull request.
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#4
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
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.