Flyway database migration to multiple schemas

前端 未结 2 1945
心在旅途
心在旅途 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).

提交回复
热议问题