DSpace 7 database migration

550 views
Skip to first unread message

Joyner Library

unread,
Sep 16, 2021, 2:02:37 PM9/16/21
to DSpace Technical Support
Hi Everyone,

We created a test server to upgrade DSpace 6.3 to DSpace 7. The database is migrating with errors. It looks like the ghost of upgrades past are haunting this new version. Running migrate ignore creates a errors like

Message    : ERROR: column "resource_type_id" does not exist
Location   : org/dspace/storage/rdbms/sqlmigration/postgres/V5.7_2017.04.11__DS-3563_Index_metadatavalue_resource_type_id_column.sql
rage\rdbms\sqlmigration\postgres\V5.7_2017.04.11__DS-3563_Index_metadatavalue_resource_type_id_column.sql)
Line       : 16
Statement  : CREATE INDEX metadatavalue_resource_type_id_idx ON metadatavalue (resource_type_id)

Please help me troubleshoot this migration.


C:\dspace7\bin>dspace database info
Using DSpace installation in: C:\dspace7

Database Type: postgres
Database URL: jdbc:postgresql://localhost:5432/dspace
Database Schema: public
Database Username: dspace
Database Software: PostgreSQL version 13.4
Database Driver: PostgreSQL JDBC Driver version 42.2.9
PostgreSQL 'pgcrypto' extension installed/up-to-date? true (version=1.3)
FlywayDB Version: 6.5.5

+-----------+----------------+-----------------------------------------------------+----------+---------------------+----------------+
| Category  | Version        | Description                                         | Type     | Installed On        | State          |
+-----------+----------------+-----------------------------------------------------+----------+---------------------+----------------+
| Versioned | 1.1            | Initial DSpace 1.1 database schema                  | SQL      |                     | Below Baseline |
| Versioned | 1.2            | Upgrade to DSpace 1.2 schema                        | SQL      |                     | Below Baseline |
| Versioned | 1.3            | Upgrade to DSpace 1.3 schema                        | SQL      |                     | Below Baseline |
| Versioned | 1.3.9          | Drop constraint for DSpace 1 4 schema               | JDBC     |                     | Below Baseline |
| Versioned | 1.4            | Upgrade to DSpace 1.4 schema                        | SQL      |                     | Below Baseline |
| Versioned | 1.5            | Upgrade to DSpace 1.5 schema                        | SQL      |                     | Below Baseline |
| Versioned | 1.5.9          | Drop constraint for DSpace 1 6 schema               | JDBC     |                     | Below Baseline |
| Versioned | 1.6            | Upgrade to DSpace 1.6 schema                        | SQL      |                     | Below Baseline |
| Versioned | 1.7            | Upgrade to DSpace 1.7 schema                        | SQL      |                     | Below Baseline |
| Versioned | 1.8            | Upgrade to DSpace 1.8 schema                        | SQL      |                     | Below Baseline |
| Versioned | 3.0            | Upgrade to DSpace 3.x schema                        | SQL      |                     | Below Baseline |
|           | 4.0            | Initializing from DSpace 4.0 database schema        | BASELINE | 2015-08-11 17:22:19 | Baseline       |
| Versioned | 4.9.2015.10.26 | DS-2818 registry update                             | SQL      |                     | Ignored        |
| Versioned | 5.0.2014.08.08 | DS-1945 Helpdesk Request a Copy                     | SQL      | 2015-08-11 17:22:19 | Success        |
| Versioned | 5.0.2014.09.25 | DS 1582 Metadata For All Objects drop constraint    | JDBC     | 2015-08-11 17:22:22 | Success        |
| Versioned | 5.0.2014.09.26 | DS-1582 Metadata For All Objects                    | SQL      | 2015-08-11 17:22:22 | Success        |
| Versioned | 5.0.2014.11.04 | Enable XMLWorkflow Migration                        | JDBC     |                     | Ignored        |
| Versioned | 5.6.2016.08.23 | DS-3097                                             | SQL      | 2017-02-10 20:33:33 | Success        |
| Versioned | 5.7.2017.04.11 | DS-3563 Index metadatavalue resource type id column | SQL      |                     | Ignored        |
| Versioned | 5.7.2017.05.05 | DS 3431 Add Policies for BasicWorkflow              | JDBC     |                     | Ignored        |
| Versioned | 6.0.2015.03.06 | DS 2701 Dso Uuid Migration                          | JDBC     | 2017-02-10 20:33:33 | Success        |
| Versioned | 6.0.2015.03.07 | DS-2701 Hibernate migration                         | SQL      | 2017-02-10 20:33:33 | Success        |
| Versioned | 6.0.2015.08.31 | DS 2701 Hibernate Workflow Migration                | JDBC     | 2017-02-10 20:34:08 | Success        |
| Versioned | 6.0.2015.09.01 | DS 2701 Enable XMLWorkflow Migration                | JDBC     |                     | Ignored        |
| Versioned | 6.0.2016.01.03 | DS-3024                                             | SQL      | 2017-02-10 20:34:08 | Success        |
| Versioned | 6.0.2016.01.26 | DS 2188 Remove DBMS Browse Tables                   | JDBC     | 2017-02-10 20:34:08 | Success        |
| Versioned | 6.0.2016.02.25 | DS-3004-slow-searching-as-admin                     | SQL      | 2017-02-10 20:34:08 | Success        |
| Versioned | 6.0.2016.04.01 | DS-1955 Increase embargo reason                     | SQL      | 2017-02-10 20:34:08 | Success        |
| Versioned | 6.0.2016.04.04 | DS-3086-OAI-Performance-fix                         | SQL      | 2017-02-10 20:34:08 | Success        |
| Versioned | 6.0.2016.04.14 | DS-3125-fix-bundle-bitstream-delete-rights          | SQL      | 2017-02-10 20:34:08 | Success        |
| Versioned | 6.0.2016.05.10 | DS-3168-fix-requestitem item id column              | SQL      | 2017-02-10 20:34:09 | Success        |
| Versioned | 6.0.2016.07.21 | DS-2775                                             | SQL      | 2017-02-10 20:34:09 | Success        |
| Versioned | 6.0.2016.07.26 | DS-3277 fix handle assignment                       | SQL      | 2017-02-10 20:34:09 | Success        |
| Versioned | 6.0.2016.08.23 | DS-3097                                             | SQL      | 2017-02-10 20:34:09 | Success        |
| Versioned | 6.1.2017.01.03 | DS 3431 Add Policies for BasicWorkflow              | JDBC     | 2017-11-28 10:52:28 | Success        |
| Versioned | 7.0.2017.10.12 | DS-3542-stateless-sessions                          | SQL      |                     | Pending        |
| Versioned | 7.0.2018.04.03 | Upgrade Workflow Policy                             | JDBC     |                     | Pending        |
| Versioned | 7.0.2018.04.16 | dspace-entities                                     | SQL      |                     | Pending        |
| Versioned | 7.0.2018.06.07 | DS-3851-permission                                  | SQL      |                     | Pending        |
| Versioned | 7.0.2019.05.02 | DS-4239-workflow-xml-migration                      | SQL      |                     | Pending        |
| Versioned | 7.0.2019.06.14 | scripts-and-process                                 | SQL      |                     | Pending        |
| Versioned | 7.0.2019.07.31 | Retrieval of name variant                           | SQL      |                     | Pending        |
| Versioned | 7.0.2019.11.13 | relationship type copy left right                   | SQL      |                     | Pending        |
| Versioned | 7.0.2020.01.08 | DS-626-statistics-tracker                           | SQL      |                     | Pending        |
| Versioned | 7.0.2020.10.31 | CollectionCommunity Metadata Handle                 | JDBC     |                     | Pending        |
| Versioned | 7.0.2021.01.22 | Remove basic workflow                               | SQL      |                     | Pending        |
| Versioned | 7.0.2021.02.08 | tilted rels                                         | SQL      |                     | Pending        |
| Versioned | 7.0.2021.03.18 | Move entity type to dspace schema                   | SQL      |                     | Pending        |
+-----------+----------------+-----------------------------------------------------+----------+---------------------+----------------+

Nick Crimi
ECU Libraries

Jose Miguel Ravasi

unread,
Jun 16, 2022, 8:30:58 AM6/16/22
to DSpace Technical Support
Hola
Tengo el mismo problema y hasta hoy no encontré como solucionarlo.
Agradeceré algún tipo de  solución u orientación por donde solucionarlo.
Los datos de origen están en Dspace 6.3 postgresql 9.6
Hice el pg_dump de la base de datos dspace
El dspace7 tiene postgresql 13 intenté con pg_restore me indico que lo haga con psql
Devuelve error de columnas, cuando termina ya dejo de funcionar el Front End
Espero alguna orientación
Saludos

José M Ravasi

Tim Donohue

unread,
Jun 16, 2022, 2:17:26 PM6/16/22
to DSpace Technical Support
Hi Nick,

This issue has been discussed before on this dspace-tech list.  Here's one of the threads where a few solutions are offered: https://groups.google.com/g/dspace-tech/c/N24obvE1mVQ/m/CtWTZ3HOAAAJ

Strangely (and I'm not sure how this occurs), some sites seem to have skipped (ignored) a few 5.x migrations which should have run when you updated to v6.  Now, when you are upgrading to v7, those migrations have become obsolete and cannot run without failures.  The only solution is to "trick" the database into thinking that the  "V5.7_2017.04.11__DS-3563_Index_metadatavalue_resource_type_id_column.sql" migration ran successfully. See that thread for details.

Tim
Reply all
Reply to author
Forward
0 new messages