comparison modules/contrib/migrate_upgrade/migrate_upgrade.drush.inc @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
38 38
39 return $items; 39 return $items;
40 } 40 }
41 41
42 /** 42 /**
43 * Execute the upgrade command, configuring the necessary migrations and 43 * Execute the upgrade command, configuring the necessary migrations.
44 * optionally perform the imports. 44 *
45 * Optionally perform the imports.
45 */ 46 */
46 function drush_migrate_upgrade() { 47 function drush_migrate_upgrade() {
47 $runner = new MigrateUpgradeDrushRunner(); 48 $runner = new MigrateUpgradeDrushRunner();
48 $runner->setOptions();
49 49
50 try { 50 try {
51 $runner->configure(); 51 $runner->configure();
52 if (drush_get_option('configure-only')) { 52 if (drush_get_option('configure-only')) {
53 $runner->export(); 53 $runner->export();
63 drush_log($e->getMessage(), 'error'); 63 drush_log($e->getMessage(), 'error');
64 } 64 }
65 } 65 }
66 66
67 /** 67 /**
68 * Rolls back any upgrade migrations that are present, and deletes the migrations 68 * Rolls back any upgrade migrations that are present.
69 * themselves.
70 */ 69 */
71 function drush_migrate_upgrade_rollback() { 70 function drush_migrate_upgrade_rollback() {
72 if ($date_performed = \Drupal::state()->get('migrate_drupal_ui.performed')) { 71 if ($date_performed = \Drupal::state()->get('migrate_drupal_ui.performed')) {
73 if (drush_confirm(dt('All migrations tagged as \'Drupal\' will be rolled back. Are you sure?'))) { 72 if (drush_confirm(dt('All migrations tagged as \'Drupal\' will be rolled back. Are you sure?'))) {
74 $runner = new MigrateUpgradeDrushRunner(); 73 $runner = new MigrateUpgradeDrushRunner();