Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL: Ignore objects created by extensions when checking whether a schema is empty #1940

wimdeblauwe opened this issue Mar 1, 2018 · 2 comments


Copy link

Is it possible to specify a list of expected database tables for the baseline migration?

i am using Flyway with Spring Boot 1.5.10 with PostgreSQL with Postgis extension. The Postgis extension creates a spatial_ref_sys table after installation. Because of this, I need to set flyway.baseline-on-migrate=true. However, I would like to somehow indicate that the database should only have that one table and nothing else.

Is this possible? If not, are you interested on adding this?

Copy link

axelfontaine commented Mar 1, 2018

We will almost certainly not solve it like this. However ... what we can do is detect whether an object was created by an extension and automatically ignore it in the empty schema check. This would be a generic way to solve this for all extensions, current and future.

@axelfontaine axelfontaine added this to the Flyway 5.1.0 milestone Mar 1, 2018
@axelfontaine axelfontaine changed the title Ability to specify expected database tables for baseline migration PostgreSQL: Ignore objects created by extensions when checking whether a schema is empty Mar 1, 2018
Copy link

That would be even better indeed 👍

axelfontaine pushed a commit to flyway/ that referenced this issue Mar 4, 2018
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants