I'm loving config migrations more and more π₯° They reduce complexity and increase stability and performance. Win-Win!
Wherever you want. Nothing changed here. You can put it in /site/migrate.php, you can put it in your /site/modules/Site/Site.module.php module's migrate() method, etc...
I have to correct myself here @Jonathan Lahijani
Today I had to create the following page reference field:
<?php
return [
'type' => 'page',
'parent_id' => '/tags/',
// ...
];
The "parent_id" setting caused a problem, because the /tags page did not exist when this was run, so the migration failed. I went ahead and implemented a way to properly, reliably and easily create new pages with your config migrations:
MAY I INTRODUCE: Config Migration Hooks π π π
Please check out the dedicated docs page, which are at the moment only on the dev branch and will soon be merged to main and then be also available on my website: https://github.com/baumrock/RockMigrations/tree/dev/docs/config-migrations-hooks