enhancement
Under certain circumstances, you may want to boot an application using a "lower" version than the one currently specified in the data state. In this case, the version identifier in the data state should be reset to the version identifier of the launched application. No actual backward migration steps are performed in this process.
Application
If you want to perform a specific, one-time migration on a data state that is not incorporated into the main development branch of an application, such a version downgrade is necessary to switch back to the main development branch.
When starting the application, the environment variable or alias ` tl_version_allow_downgrade ` must be set to ` true ` for the downgrade.
Alias definition:
#!xml
<entry name="%tl_version_allow_downgrade%" value="${env:tl_version_allow_downgrade:false}" />
Test
- Add a migration statement to a CWS.
- Start the application on this CWS
- The version is upgraded to the local CWS version.
- Restart the application on the trunk.
- The application fails to start because a downgrade is required.
- Set the environment variable as described above.
- Restart the application.
- The application boots normally; the downgrade is noted in the log.
2020-04-01 13:34:38.279 INFO [main]: top_logic.basic.config.ApplicationConfig - No valid version found for database version 'tl-element:24494-Upgrade_temporary_multiline_annotation_change' in versions [tl-element:22747-Add_GenericObject_table]. 2020-04-01 13:34:38.279 INFO [main]: top_logic.basic.config.ApplicationConfig - Downgrading application version.
- Restart the application and launch it again without the environment variable.
- The application continues to start normally without migration or downgrade.