Migrate the definition
Sometimes when updating an older module you might want to take advantage of configuration by file using YAML. If you have already created definitions in JCR it's really easy to move them to YAML.
Open the Configuration app and find the definition to migrate.
See Light development in Magnolia for a list of definition types supported by light modules.
- Use the Download definition action to export the definition to YAML. This is different then the regular export function which creates bootstrap files.
- Rename the file. The action will use the complete path for the filename. It's better to use something shorter. For example, config.modules.tours.apps.tours.yaml becomes tous.yaml.
Create a registry in the light module if not already existing. In the case of an app then an "apps" registry (or directory) is created.
- Delete the JCR based version of the app from configuration. You can also remove the apps registry from JCR (if there are no other JCR apps).
- Check to make sure the new YAML based definition does not have any errors in the Definitions app.
If you use a version handler then you will need to remove the old JCR app from any system the module get's installed into.
The current JCR based Tours app is being installed by version 1.5 of the module. So in 1.5.1 the node should be removed (or the entire apps node in the case of all apps being migrated).