Migrations
Many extension points in Jadu Central will require changes to be made to the database (e.g. insert a record to register a plugin) or local filesystem (e.g. add a line to a configuration file).
To ensure these changes are applied consistently alongside the deployment of any developed extension, they must be written in the framework of Doctrine Migrations.
Creating migrations
Jadu uses the Meteor packaging and deployment tool to manage and execute migrations.
While it is not a requirement to use Meteor during development, it is recommended. You should download the latest Meteor release and place it in your project's root directory.
To create a new database migration using Meteor:
$ php meteor.phar migrations:generate
[OK] Generated migration in
/Users/Me/MyProject/upgrades/migrations/Version20240625110132.php
To create a new file migration using Meteor:
$ php meteor.phar file-migrations:generate
[OK] Generated migration in
/Users/Me/MyProject/upgrades/migrations/filesystemVersion20240625110133.php
You will need to populate the up()
and down()
methods in the migration files
with the changes necessary for your extension. Please see the documentation for
each individual extension point for details and examples of the changes that
are required as part of their implementation.
Migrations within your project must only operate with database records and files in the way specified in this documentation.
Interacting with areas outside of those specified may result in unexpected behaviour, leading to failed deployments and potentially data loss due to, for example, database schema changes.
Only the specific extension points detailed in this documentation are guaranteed not to change between minor version updates and will have a transition path provided when changes are made between major versions.