Flyway database migration to multiple schemas

前端 未结 2 1946
心在旅途
心在旅途 2021-01-12 20:37

I\'ve set up a migration script for my multi-tenant application. the problem was. it\'s only generating the scripts for the first tenant/schema I\'ve specified on the parame

相关标签:
2条回答
  • 2021-01-12 21:22

    To create multiple identical schemas you have to invoke Flyway once for each schema, with the flyway.schemas property set the to correct value. Flyway will then set the correct schema as the default one, letting you run your migration scripts unchanged (as long as you don't prefix the object names).

    0 讨论(0)
  • 2021-01-12 21:35

    Please find recommendations from flyway as in

    http://flywaydb.org/documentation/faq.html#multiple-schemas

    Hope this helps.

    0 讨论(0)
提交回复
热议问题