-
Notifications
You must be signed in to change notification settings - Fork 19
How to use new Migration Strategy (Branches Support)
Autopatch 1.3 introduces a new way strategy for patching, even though the ordering system for patches is still used, now you will be able to apply patches from different git branches.
This strategy works by looking at the patches that have not been run in the patches table and apply them if needed, so if for instance you created patch0005.sql in one branch and another developer created patch0004.sql in another one and then you merge them, autopach will look at the database to see if patch0004.sql was applied and since it has not been run, it will run maintaining your database up to date with the schema.
Be aware that if both of the developers created patch0005.sql with different sentences and you merge the file, since patch0005.sql was already run it will not run again, so you need to coordinate very well with other developers so things like this does not happen, each developer should create their patches with different numbers.
To use it you need to update the migration.properties file and add the following line or replace it if exists:
migration.strategy=com.tacitknowledge.util.migration.MissingPatchMigrationRunnerStrategy
- Overview
- Design Requirements
- Basic Design
- Detailed Design
- How to integrate AutoPatch with a web application
- How to integrate AutoPatch with your development cycle
- How to implement a patch
- How to extend AutoPatch with new patch types
- How to rollback patches
- How to migrate from AutoPatch 1.1 to AutoPatch 1.2
- How to Migrate to AutoPatch 1.3