Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3788

Flyway migration "Hibernate Workflow Migration" fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 6.0, 6.1, 6.2
    • Fix Version/s: 6.3, 7.0
    • Component/s: API
    • Labels:
      None
    • Environment:
      Oracle XE 11.2, CentOS 7, Java 7, etc.
    • Attachments:
      1
    • 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

            Activity

              People

              Assignee:
              tdonohue Tim Donohue
              Reporter:
              kardeiz Jacob Brown
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: