I'd like to introduce flyway on an existing production database. I've read https://flywaydb.org/documentation/existing but I'd like to skip the step "Take a DDL and reference data extract from production"
Let me explain why:
When having the same schema from PROD in DEV flyway will be used for migration. My approach is to start flyway with flag baselineOnMigrate so the houskeeping table "flyway_schema_history" is automatically created.
I know the disadvantage is that a DB cannot be created from scratch by flyway but besides it should work out.
I did a test with some scripts and it looks good so far ("success" column shows "1")
My Questions:
You are talking about DDL (data definition language) and in the same sentence you are anonymonize existing data (DML, data modification language). Maybe you mixing up two different things.
Flyways primary goal is to migrate your database from scratch. This means creating, altering and dropping tables and other database objects.
I recommend to
extract the DDL from your production database and add it as V1 migration script
handle the data insertion and the anonymonizing yourself for the Dev environment.
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With