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

Support for reference-partitioned tables (Oracle 11g) #178

flyway opened this issue Jun 25, 2013 · 2 comments

Support for reference-partitioned tables (Oracle 11g) #178

flyway opened this issue Jun 25, 2013 · 2 comments


Copy link

flyway commented Jun 25, 2013

Original author: (March 28, 2013 09:17:26)


We introduced reference partitioning (Oracle 11g). As a consequence, the flyway clean goal fails with "ORA-14656: cannot drop the parent of a reference-partitioned table".

Flyway drops tables by using "drop table xyz cascade constraints purge". Unfortunately, this does not work for reference-partitioned tables.

We see two possible ways to solve this issue:

  1. Introducing some plsql code (in OracleDbSupport class) for dropping tables in a "bottom to top" order.
  2. The clean goal supports a dedicated script directory (like migrate does). These scripts are executed (if any) by the clean goal (replacing the default drop behaviour).

Solution 2 is more like a new feature than a bugfix. Which solution would make sense to you? Or any less invasive ideas for solving this issue?

If you wish, we could contribute to solution 1 and provide a pull request. We wrote a plsql script dropping the user tables in correct order and could try to integrate it into OracleDbSupport.


PS: I attached the plsql script (not the final version, but just to give an idea...)

Original issue:

Copy link
Collaborator Author

flyway commented Jun 25, 2013

From on April 01, 2013 17:23:31
Hi Sandro,

thanks for reporting this. I am not particularly keen on either of these solutions. I could however accept a pull request that lists and drops the child tables first, before the parents. (This is the order I assume they should be dropped in)

I unfortunately have no means to test this myself as this is only available in Oracle Enterprise.


Copy link

Fixed by merge of #1006

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

1 participant