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

Postgres 14 dependent domains do not clean in the correct order #3516

Closed
oaowren opened this issue Sep 6, 2022 · 0 comments
Closed

Postgres 14 dependent domains do not clean in the correct order #3516

oaowren opened this issue Sep 6, 2022 · 0 comments
Milestone

Comments

@oaowren
Copy link

oaowren commented Sep 6, 2022

Which version and edition of Flyway are you using?

9.2.2

If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Command-line and Java API

Which database are you using? (Type & version)

Postgresql 14.5

Which operating system are you using?

MacOS Monterey 12.5.1

What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)

Steps to reproduce:

  1. Set up latest version of command line Flyway (9.2.2) connected to a database running Postgres 14, with cleanDisabled=false
  2. Create a single migration-file with the following content:
CREATE DOMAIN non_negative_integer AS int8 CHECK (VALUE >= 0);

CREATE DOMAIN stat_integer AS non_negative_integer NOT NULL DEFAULT 0;
  1. flyway migrate and then flyway clean

Migration file causing issues has previously been confirmed to work with Flyway 4.0 and Postgresql 10.20, Java API.

What did you expect to see?

Successful cleaning of database

What did you see instead?
ERROR: cannot drop type non_negative_integer because other objects depend on it
  Detail: type stat_integer depends on type non_negative_integer
  Hint: Use DROP ... CASCADE to drop the dependent objects too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants