Setup Migration Core
Migration Core is an easier addon to setup for your app, but whenever you are trying to update migration core, you have to remember that it is the only addon that is shared with the Group Control App, which means that if there is a conflict between the Group Control version of Migration Core, and your app's version, it will use Group Control's version. That being said, whenever you have to update Migration Core, it must have been updated and released in Group Control, and you need to update your Group Control App dependency version (to ensure that Group Control is on the newest version of Migration Core).
It is worth noting that every app already has Migration Core setup for you (because it is the one serverside addon setup by the app generator), but it is worth pointing out the things which you have to do to set up Migration Core if you were doing it from scratch.
Generic Setup
Of course, before any of the specific setup for the addon can be completed, you must do the generic setup for all addons to install it to the app. If you forgot how to do this, see Setup section of Using Addons in the main docs.
Migration Core Specific Setup
The only other setup you need to do is create your server/data
folder which contains both phinx.php
(which is the file containing the configuration for Phinx), and your migrations
folder, which will contain all your database migration files. This can be found in the migration-core/blueprint/
folder, which will give you a template for what these files should look like. We do not really mess with configurations for Phinx, and keep them the defaults, but we do have the ability to adjust the configuration through the phinx.php
file if the need arose.
In order for migration core to work properly, you will also need to setup the database
credentials in the config, but this is done for you whenever you install any app (through the fw install
command asking for your information), so you likely won't have to do that either.