From 62860ffad51c438b62e7ba50cad9754ce10bb2f7 Mon Sep 17 00:00:00 2001 From: Chintan Desai Date: Tue, 15 Feb 2022 18:37:00 +0000 Subject: [PATCH] Initial commit --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..011d956 --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +# Demo Migration Module + +This is a heavily redacted version of the module that was used in one of my +projects. It was created to import node, paragraph and media content from CSV files. + +## Installation + +### Step 1: Add with Composer: + +Please add the following snippet to the repositories section of your Drupal +project's root composer.json file: + + { + "type": "vcs", + "url": "https://akhado.wezbyte.com/WezByte-Public/cdesai-migration" + } + +Add the module to your project: + + composer require drupal/cdesai_migration + +### Step 2: Enable the Module: + +#### Using Drupal Website + +1. Navigate to the Extend page (admin/modules) via the Manage administrative menu +1. Locate the module(s) you wish to enable and check the box next to each one +1. Click Install to enable (turn on) the new module(s) + +Refer to https://www.drupal.org/docs/extending-drupal/installing-modules#s-step-2-enable-the-module + + +## Prepare the Source Site + +## Prepare the Target Site + +The target site should be running Drupal 9.3 or higher. There are changes to the way file imports work that won't work in earlier versions. + +@TODO List all requirements. + +Enable the core Migrate module. Download and enable the [Migrate Plus](https://www.drupal.org/project/migrate_plus) and [Migrate Tools](https://www.drupal.org/project/migrate_tools) modules. Make sure to get the versions that are appropriate for the current version of core. Migrate Plus had 8.0 and 8.1 branches that only work with outdated versions of core, so currently you need version 8.2 of Migrate Plus. + +## Edit the Migration YAML Files + +Copy the Drupal Import module (this module) into your module repository. Edit the YAML files in /config/optional to alter the JSON source url so it points to the domain for the source site created in the earlier step. + + +## Run the Migration + +Once you have the right information in the YAML files, enable the module. On the command line, type this: + +``` +drush migrate-status +``` + +@TODO Add instructions as migrations are developed. + +It is important to note that if you alter the YAML files after you first install the module, you'll have to uninstall and then reinstall the module to get Migrate to see the YAML changes. + +There is more information about the [Migrate API on Drupal.org](https://www.drupal.org/docs/8/api/migrate-api/migrate-api-overview).