Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Migrate Run commands in Drush core #4606

Merged
merged 54 commits into from
Jan 3, 2021
Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
471e247
Initial commit with code from PR #3402.
claudiu-cristea Dec 15, 2020
43925d5
Apply https://www.drupal.org/project/migrate_run/issues/3184771.
claudiu-cristea Dec 15, 2020
7575b21
Fix deprecated assertions.
claudiu-cristea Dec 15, 2020
684479b
Remove faulty debug statement.
claudiu-cristea Dec 15, 2020
ea4db9f
Try a fix for PHP8
claudiu-cristea Dec 15, 2020
fe7f5dc
Try to fix on Win OS.
claudiu-cristea Dec 15, 2020
ce41c0c
Avoid passing user data by reference.
claudiu-cristea Dec 15, 2020
9393bb4
Restore composer.lock
claudiu-cristea Dec 15, 2020
6819508
New Windows fix.
claudiu-cristea Dec 15, 2020
3cc9475
Resolve the query.
claudiu-cristea Dec 16, 2020
6566345
Regression test for https://www.drupal.org/project/migrate_tools/issu…
claudiu-cristea Dec 16, 2020
19899ad
Typo
claudiu-cristea Dec 16, 2020
7f0852f
Fix PHPUnit deprecation.
claudiu-cristea Dec 16, 2020
9d435bb
Debug Windows tests.
claudiu-cristea Dec 16, 2020
0f616ec
Only check migration output.
claudiu-cristea Dec 16, 2020
ce52a55
Relax the regexp.
claudiu-cristea Dec 16, 2020
b3b9dc0
Win debug.
claudiu-cristea Dec 16, 2020
72df78b
Fix Windows tests.
claudiu-cristea Dec 16, 2020
d62abfd
Regression test for https://www.drupal.org/project/migrate_tools/issu…
claudiu-cristea Dec 16, 2020
e2138df
Fix source od random failures.
claudiu-cristea Dec 16, 2020
2156f76
Coding standards.
claudiu-cristea Dec 16, 2020
b47b25a
Apply https://www.drupal.org/project/migrate_tools/issues/3011996
claudiu-cristea Dec 16, 2020
e4d1349
Fix strict typing in MigrateRunnerCommands
claudiu-cristea Dec 16, 2020
5104bd5
Coding standards.
claudiu-cristea Dec 16, 2020
35ef555
Test user entered invalid migrations
claudiu-cristea Dec 17, 2020
13719f2
Coding standards.
claudiu-cristea Dec 17, 2020
24eb728
Test failures on rollback
claudiu-cristea Dec 17, 2020
ae5736a
Revisit command arguments & options, camelize variables.
claudiu-cristea Dec 17, 2020
3fc4517
Progress bar. See https://www.drupal.org/project/migrate_tools/issues…
claudiu-cristea Dec 18, 2020
375b9d6
Make the progress bar output predictable
claudiu-cristea Dec 18, 2020
d8419a4
Fix Win test.
claudiu-cristea Dec 18, 2020
dacfea1
Coding standards.
claudiu-cristea Dec 18, 2020
8f932c4
Partially apply https://www.drupal.org/project/migrate_tools/issues/2…
claudiu-cristea Dec 18, 2020
cd40d02
Improve documentation.
claudiu-cristea Dec 18, 2020
49da281
Conflicts with drupal/migrate_tools and drupal/migrate_run
claudiu-cristea Dec 20, 2020
ce93a7e
Implement https://www.drupal.org/project/migrate_tools/issues/2809433
claudiu-cristea Dec 31, 2020
298015a
What is the origin of this strange @validate-module-enabled tag?
claudiu-cristea Dec 31, 2020
1fe7b10
Don't add comma after last param.
claudiu-cristea Dec 31, 2020
d08af52
Ensure a test that works regardless of Symfony version.
claudiu-cristea Dec 31, 2020
66c8467
Use the <info> tag.
claudiu-cristea Dec 31, 2020
7222b7f
Move migrate_runner.inc.
claudiu-cristea Dec 31, 2020
a9ddc4e
Use ::success() instead of ::log()
claudiu-cristea Dec 31, 2020
5069295
Exception instead of log error
claudiu-cristea Dec 31, 2020
571c52e
Use StringUtils::csvToArray()
claudiu-cristea Dec 31, 2020
4e60e8d
Simple progress bar on Windows.
claudiu-cristea Dec 31, 2020
cf67193
Apply https://www.drupal.org/project/migrate_tools/issues/2960221
claudiu-cristea Dec 31, 2020
116af2b
Another Windows fix tentative.
claudiu-cristea Dec 31, 2020
d1abad7
Test fix follow-up
claudiu-cristea Dec 31, 2020
be0b849
Minor docs fix.
claudiu-cristea Jan 1, 2021
45f0a12
Re-fix reverted fix ;)
claudiu-cristea Jan 1, 2021
2508eb1
Reverted by mistake
claudiu-cristea Jan 1, 2021
93e59f6
Remove @drupal-dependencies
claudiu-cristea Jan 1, 2021
e6d5beb
Use ->success() instead of ->log()
claudiu-cristea Jan 1, 2021
1f362cb
Remove leftover
claudiu-cristea Jan 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
"squizlabs/php_codesniffer": "^2.7 || ^3",
"vlucas/phpdotenv": "^2.4"
},
"conflict": {
"drupal/migrate_run": "*",
"drupal/migrate_tools": "<= 5"
},
"autoload": {
"psr-4": {
"Drush\\": "src/",
Expand All @@ -73,6 +77,9 @@
"psr-4": {
"Unish\\": "tests/unish"
},
"classmap": [
"sut/core/modules/migrate/src"
],
"files": ["tests/load.environment.php"]
},
"config": {
Expand Down
25 changes: 25 additions & 0 deletions docs/migrate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Defining and running migrations
===============================

The Migrate API delivers services for migrating data from a source system to Drupal 8. This API is provided by the core `migrate` module. In order to migrate data to Drupal, you'll need to create migrations for each type of destination data.

These commands are an alternative to https://www.drupal.org/project/migrate_tools/. Dont use that module if you use these commands. Also, that module expects migrations to be defined as config entities whereas these commands expect migrations to be defined as YAML plugins (same as Drupal core).

Defining migrations
-------------------

Learn how to create migrations from the Drupal official documentation:

* Migrate API overview: https://www.drupal.org/docs/8/api/migrate-api/migrate-api-overview
* Drupal API: https://api.drupal.org/api/drupal/core%21modules%21migrate%21migrate.api.php/group/migration

Running migrations
------------------

Drush provides a set of commands that allows to run migration operations such as importing, checking the current status of migrations, rolling-back migrations, stopping an ongoing migration, etc. Such commands are available *only* when the `migrate` module is enabled. In order the get a full list of migrate commands, type:

drush --filter=migrate

To get help on each command run drush with the command name as parameter and the `--help` option. For example next command will show details about the `migrate:import` Drush command:

drush migrate:import --help
12 changes: 12 additions & 0 deletions src/Commands/core/DocsCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,18 @@ public function exampleCommand()
self::printFileTopic($this->commandData);
}

/**
* Defining and running migrations.
*
* @command docs:migrate
* @hidden
* @topic TBD
claudiu-cristea marked this conversation as resolved.
Show resolved Hide resolved
weitzman marked this conversation as resolved.
Show resolved Hide resolved
*/
public function migrate()
{
self::printFileTopic($this->commandData);
}

/**
* Extend sql-sync to allow transfer of the sql dump file via http.
*
Expand Down
Loading