Flyway - managing multiple schemas doesn't wor

2019-02-26 05:58发布

问题:

I'm trying to do a migrate on a number of different Postgresql schemas that have the same lifecycle. According to the flyway documentation such a scenario should work. I have the following in my ANT script: When I run the migration, the changes are only applied to the first (default) schema.

Am I doing something wrong, or does the flyway.schemas property only work for clean?

Thank you

回答1:

When dealing with multiple schemas, you still have to prefix the object names accordingly. Only the first one in the list is set as the default one for the connection.

And yes, you are correct, clean will deal with all schemas.