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

Closed
flyway opened this issue Jun 25, 2013 · 2 comments
Closed

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

flyway opened this issue Jun 25, 2013 · 2 comments

Comments

@ghost
Copy link
Collaborator

@ghost ghost commented Jun 25, 2013

Original author: sandro.d...@gmail.com (March 28, 2013 09:17:26)

Hi,

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.

Cheers,
Sandro

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

Original issue: http://code.google.com/p/flyway/issues/detail?id=465

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

From axel.fontaine.business@gmail.com 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.

Cheers
Axel

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Aug 27, 2015

Fixed by merge of #1006

axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Aug 27, 2015
@axelfontaine axelfontaine added this to the Flyway 4.0 milestone Aug 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant