Uploaded image for project: 'Gateway'
  1. Gateway
  2. GTWY-1632 Verify functionality of the CADIS portal after merging into trunk.
  3. GTWY-1630

Liquibase changeset 20100112-SGF-1124.xml will not run for CADIS.

XMLWordPrintable

    • Icon: Work Task Work Task
    • Resolution: Done
    • Icon: Major Major
    • 1.3.0
    • None
    • Database, Portal - CADIS
    • None

      When an update is done on a database restored from the CADIS release site, the following error occurs:

      /Users/hannah/Documents/workspace/gateway-webapp/Ant/liquibase-tasks.ant.xml:145: liquibase.exception.MigrationFailedException: Migration failed for change set /liquibase/update/changesets/20100112-SGF-1124.xml::20100112-SGF-1124::ncw:
           Reason: liquibase.exception.JDBCException: Error executing SQL ALTER TABLE metadata.logical_file ALTER COLUMN lineage_id SET NOT NULL:
                Caused By: Error executing SQL ALTER TABLE metadata.logical_file ALTER COLUMN lineage_id SET NOT NULL:
                Caused By: ERROR: column "lineage_id" contains null values

      This changeset sets the lineage_id in the following fashion:

      <sql>
      UPDATE metadata.logical_file sourcefile SET lineage_id =
      (SELECT identifier FROM metadata.persistent_identifier ident where ident.resource_id = sourcefile.id and ident.type_id=0);
      </sql>

      The empty files added to CADIS as a search workaround only added logical files, not persistent IDs for those logical files so those particular files will not create a lineage_id, causing the error. Persistent IDs will have to be added for all the empty files added for the search workaround as well as logic to add persistent IDs in the metadata editor where a placeholder file is added when a new dataset is created.

              Unassigned Unassigned
              hannah Hannah Wilcox (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: