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

DEV - MIG - UI Rollback option for CSV Migration Group #105

Closed
wants to merge 5 commits into from

Conversation

dynac01
Copy link
Contributor

@dynac01 dynac01 commented May 24, 2024

No description provided.

{
$migration_group_name = $this->migrationGroupDeriver->deriveName($this->entity);

$command = sprintf('drush dgi-migrate:rollback --group=%s', escapeshellarg($migration_group_name));
Copy link
Contributor Author

@dynac01 dynac01 May 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm calling the command directly as I was unable to resolve the required in islandora_spreadsheet_ingest.services.yml. Let me know if there are any concerns with this.

@@ -10,3 +10,5 @@ dependencies:
- migrate_plus:migrate_plus
# We generate links to endpoints migrate_tools defines.
- migrate_plus:migrate_tools
# Currently need to access dgi_migrate drush commands
- dgi_migrate:dgi_migrate
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this since the rollback method used in the solution comes from the dgi_migrate module

@@ -145,7 +147,7 @@ public function submitActivation(array &$form, FormStateInterface $form_state) {
* @param mixed $context
* A reference to the batch context.
*/
public function runBatchOp(MigrationInterface $migration, MigrateBatchExecutable $e, &$context) {
public function runBatchOp(MigrationInterface $migration, MigrateExecutable $e, &$context) {
Copy link
Contributor Author

@dynac01 dynac01 May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this because both MigrateBatchExecutable and MigrationRollbackBatch extend MigrateExecutable

@dynac01 dynac01 closed this May 28, 2024
@dynac01 dynac01 deleted the feature/add-option-to-rollback-full-migrations branch May 28, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant