osu-wams / osu_migrations
Drupal Migrations to upgrade from OSU Drupal 7.
Package info
github.com/osu-wams/osu_migrations
Type:drupal-custom-module
pkg:composer/osu-wams/osu_migrations
Requires
None
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- drupal/coder: ^8.3
- j13k/yaml-lint: ^1.1
- squizlabs/php_codesniffer: ^3.7
- symfony/console: ^6.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-21 17:37:31 UTC
README
Contains submodules for D7 to D9 migrations
OSU Migrations Files
To properly migrate files, open up the upgrade_d7_files.yml and set the source_base_path to either the public url of the drupal or set the file path to the root of the distro.
Currently, it is set to the base of this installation, so one could copy the files into the container and run the migration.
Migrations:
Migrations need to be run in a specific order.
-
User Accounts
This runs every migration require to bring in user accounts and their CAS account linking.
drush migrate:import --tag='OSU Accounts' -
Media
Migrate all the Files and Media entities. Ensure that you first update the
upgrade_d7_file_private.ymlfile to include the correct path to the private files directory. Do not commit this change.drush migrate:import --tag='OSU Media' -
Taxonomy Tags
drush migrate:import --tag='OSU Taxonomy' -
Migrate Custom Block Content
We need to migrate all the custom block contents first before paragraphs as we use block content in the paragraph migration, and we want to ensure all the original IDs of the blocks are there first.
drush migrate:import --tag='OSU Custom Blocks' -
Paragraphs to Layout Builder
Paragraphs to Layout Builder migration require two steps:
-
Feature Story/Articles to Story
drush migrate:import --tag='Feature Story' -
Other Content Types and Content Migrations
To import other Content types, fields, Widget settings, and nodes
drush migrate:import --tag='OSU Configuration' --forceImporting the content after all the Node types, Fields, and displays modes are migrated.
drush migrate:import --tag='OSU Content' --forceCustom Content types there will be times when fields that are associated with a Node Bundle use:
- File/Image reference
- Taxonomy Term Reference
- Entity Reference
- Text Area (other than Body field)
With these fields you will need to write a custom Migration YAML for each node type and manually set the Lookup Plugins for References and use the
osu_media_wysiwyg_filterplugin on the Text Area fields to ensure that embedded media is updated to use the new Drupal embedding system. See Site Specific Migrations and Custom Content Types for more information. -
Views
drush migrate:import d7_views_migrationIf you have a list of views IDs you only want to migrate, you can do that with:
drush migrate:import d7_views_migration --idlist=events,event_list -
Site Specific Migrations
Create a new module under site_migrations and name it 'osu_migrations_site' where 'site' is some short version of the site working with. This will contain any configurations and migrations for this specific site that would not be migrations that the rest of the distribution would go.
Enable your new module and run any of the migrations you define.
-
Migrate Groups
Associate different Nodes with their Groups and create menu entries.
drush migrate:import --tag='OSU Groups'For Custom node Bundles that are Associated with Organic Groups in Drupal 7, see Custom Content Types in Groups -
Migrate the URL Aliases and Redirects
drush migrate:import --tag='OSU Alias'drush migrate:import --tag='OSU Redirect' -
The Last content migration to run is Users to Profiles
drush migrate:import --tag='OSU Drupal Profile' -
Menus
drush migrate:import --tag='OSU Menus' -
Block Placement
Migrate all block placements.
drush migrate:import --tag='OSU Blocks'
Custom Content Types
You can use the Migration tag OSU Configuration to have Drupal create the Content types and Fields. Any
Taxonomy Term Reference, Entity Reference fields need to have their Bundles updated to match what was configured in
Drupal 7. Inside the site_migrations folder you will find previous migrations that required custom migration YAML's,
use them for examples.
Custom Content Types in Groups
For Node types that are added to Organic Groups (Organic Group Content), a separate migration YAML is required to
associate the new nodes with groups. Firstly, you need to "Install" Groups on the Custom Content type. Then using the
Machine name generated for this Group association, the Migration YAML can be set to add the nodes to the Group.
Proper order should be respected, Nodes need to be migrated first Then the group Association Migration. Check
out site_migrations For examples of Group Content migration.
Custom Content Types with Paragraph Fields.
If the Paragraphs Module was used on any other Node bundle other than Basic Page and Book Page you must create a
custom
YAML migration for this. Checkout the site_migrations folder for past migrations to use as examples.
@TODO Document process for Field Collections To paragraphs