discoverygarden/dgi_migrate

Maintainers

Package info

github.com/discoverygarden/dgi_migrate

Type:drupal-module

pkg:composer/discoverygarden/dgi_migrate

Statistics

Installs: 4

Dependents: 1

Suggesters: 0

Stars: 1

Open Issues: 3

v3.20.0 2026-02-23 18:01 UTC

README

License: GPL v3

Introduction

A module to facilitate I7 to Modern Islandora migration.

Table of Contents

Features

An improved migration import command migrate:batch-import is included. An example FOXML migration that can be used as a starting point is provided. It illustrates the usage of migrate plugins that have been created to facilitate FOXML and large data processing.

  • dgi_migrate.process.xml.xpath is limited to xpath 1.0.

Some migration helper scripts are also included. Refer to the readme for more details.

Included modules

DGI Migrate has a suite of submodules to assist in the migration process.

Requirements

This module requires the following modules/libraries:

Installation

Install as usual, see this for further information.

Usage

migrate:batch-import beer_node_revision --idlist=1:2,2:3,3:5 --user=islandora
dgi-migrate:rollback beer_user --idlist=5 --user=islandora

Configuration

Search API, direct/immediate indexing

The suppression search_api's "immediate indexing"/index_directly functionality (which can cause instability in long processes, when search_api attempts to index potentially large sets of entities at the end of the request) is enabled by default, but can be configured by multiple means.

  • The DGI_MIGRATE_SUPPRESS_DIRECT_INDEXING_DURING_MIGRATIONS environment variables takes precedence if set. The string true should enable (case-sensitive!); while any other non-empty value should disable.
  • In config: dgi_migrate.settings:suppress_direct_indexing_during_migrations, as a boolean flag.

Entity update process

Migrations can update existing entities (even without the --update flag), should the process identify an existing entity; however, during this process, if all the source properties are not provided for the destination rows that are mapped, it might end up erasing the related fields/properties from the entities in the database.

To permit partial sources to be provided, we have implemented a process to try to track which destination properties did not have a corresponding source property, by implementing some handling around the get plugin. Where there is no source properties for an existing entity, existing values should be left intact. If a source property is provided with an empty value, the existing value should be erased.

This functionality is enabled by default; however:

  • it only affects migrations making use of our dgi_revisioned_entity destination plugin
  • it might be disabled by specifying an environment variable DGI_MIGRATE_TRACKING_GET_DISABLED=true.

NOTE: There may be other plugins that access properties from the row by means other than using the get plugin, to which the current implementation is blind, for example, dgi_migrate.process.entity_query, via its conditions key.

Troubleshooting/Issues

Having problems or solved a problem? Contact discoverygarden.

Known Issues:

  • php://filter use can lead to large memory usage
    • we should probably look at rolling another stream wrapper to wrap up our usage of OpenSSL to Base64 decode
  • There are some expensive assertions made in the code, particularly regarding binary datastream content with digests. Assertions should typically be disabled in production environments, so these shouldn't have any impact on execution there; however, in development environments, could potentially lead to issues, especially with larger datastreams, exacerbated by the php://filter usage to Base64-decode the contents
    • hesitant to remove the assertions without having any other mechanism to
    • could instead roll some unit tests?
  • For archival FOXML, a patch for iqb/substream may be necessary to address a bug in the stream wrapper implementation; otherwise, there may be MigrateExceptions thrown which point back at a failure to write to the filtering process, while the actual issue pops out from the stream_copy_to_stream() proper.

Resources

DGI migrate enhances Drupal's core migration framework and provides plugins to facilitate migration of legacy Islandora data to Modern Islandora. For more details regarding Drupal's migrate API and workflow, refer to these documents:

Maintainers and Sponsors

Current maintainers:

Sponsors:

Development/Contribution

If you would like to contribute to this module, please check out github's helpful Contributing to projects documentation and Islandora community's Documention for developers to create an issue or pull request and/or contact discoverygarden.

License

GPLv3