I have the following script for my application:
- 1 Production Server
- 1 test server
- n Computer development
For database migration, we use the Hibernate schema update for the schema and DBUnit to populate all production data (on all servers / computers). When the schema update is complete, I generate a new DTD file for the new schema, so I can make a new import of the XML DBUnit file. The application updates the database at startup using an XML file (only for developers and test servers / computers!)
Of course, this approach is not optimal and fragile. So I looked at Liquibase and Flyway. Both seem like great tools, but I don't get it: how do I transfer data? In my case, I delete the data of the production system once a week and add it to the original application control as an XML DBUnit file, so all developers have βfreshβ data, and the test server also has the current production data.
The problem that I see with Liquibase and Flyway is that there is no solution how to automate the differences with the database data and automatically generate migration changes.
So my idea is this:
- Install Hibernate for verification instead of updating.
- When a change to the STRUCTURAL database is required, I add it to the transfer script for the main version
- There are no script attachments in the migration.
- DTD DBunit
- DBUnit XML .
JavaMigration DBUnit. . - : diff script ?
, - , :)