![]() |
Migrations in version folders - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29) +--- Thread: Migrations in version folders (/showthread.php?tid=65535) |
Migrations in version folders - spjonez - 06-23-2016 In our app we extended the migration class to organize migrations into version folders. Eg; /migrations/ /migrations/0.8.0/ /migrations/0.8.0/timestamp_base_080.php /migrations/0.8.0/timestamp_name1.php /migrations/0.8.1/ /migrations/0.8.1/timestamp_base_081.php /migrations/0.8.1/timestamp_name2.php The base files have empty up/down methods and are used to reset yourself between branch changes. find_migrations pulls a key pair array with the version id as the key and the files array as the value. Having all files stored in a single folder can be cumbersome to manage over time. Is this a feature you'd be interested in adding to CI? I could send a PR for the current release if you feel it would be useful to others. |