Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 6.0, 6.1, 6.2
-
Component/s: API
-
Labels:None
-
Environment:Oracle XE 11.2, CentOS 7, Java 7, etc.
-
Attachments:
-
Comments:8
-
Documentation Status:Complete or Committed
Description
With a new installation of DSpace 6.2, pretty generic configuration (e.g., no edits to anything around Flyway/Hibernate/etc.), and a fresh database with Oracle XE 11.2, `./dspace database migrate` fails at "6.0.2015.08.31 | DS 2701 Hibernate Workflow Migration" with the following error
Script failed ------------- SQL State : 72000 Error Code : 12991 Message : ORA-12991: column is referenced in a multi-column constraint Line : 36 Statement : ALTER TABLE cwf_collectionrole DROP COLUMN collection_legacy_id at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java:117) at org.dspace.storage.rdbms.DatabaseUtils.executeSql(DatabaseUtils.java:1089) ... 25 more Caused by: java.sql.SQLException: ORA-12991: column is referenced in a multi-column constraint
Unless I am missing something, this looks like a bug in the Oracle SQL. It looks like the PostgreSQL commands were just copied into another file without the appropriate modifications (apparently Oracle doesn't handle column renaming in the same way as Postgres).
I ran the relevant SQL data definitions in Oracle directly and got the error reported by Flyway.
The faulty file: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/workflow/oracle/xmlworkflow/V6.0_2015.08.11__DS-2701_Xml_Workflow_Migration.sql.
Attachments
Issue Links
- is related to
-
DS-3829 Oracle Flyway migration from old DSpace versions broken
-
- Code Review Needed
-