Unverified Commit 6fa0f86b authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3098427 follow-up by amateescu, catch, alexpott: Manipulating the...

Issue #3098427 follow-up by amateescu, catch, alexpott: Manipulating the revision metadata keys before running the BC layer breaks the BC layer

(cherry picked from commit f94693e8)
parent 14ea9e57
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -196,19 +196,5 @@ function workspaces_update_8803() {
    ]);
    $entity_type->setStorageClass(ContentEntityNullStorage::class);
    $entity_definition_update_manager->uninstallEntityType($entity_type);

    // Delete the entity and field schema data.
    $keys = [
      'workspace_association.entity_schema_data',
      'workspace_association.field_schema_data.id',
      'workspace_association.field_schema_data.revision_id',
      'workspace_association.field_schema_data.uuid',
      'workspace_association.field_schema_data.revision_default',
      'workspace_association.field_schema_data.target_entity_id',
      'workspace_association.field_schema_data.target_entity_revision_id',
      'workspace_association.field_schema_data.target_entity_type_id',
      'workspace_association.field_schema_data.workspace',
    ];
    \Drupal::keyValue('entity.storage_schema.sql')->deleteMultiple($keys);
  }
}
+19 −0
Original line number Diff line number Diff line
@@ -143,3 +143,22 @@ function workspaces_post_update_update_deploy_form_display() {
    $form_display->removeComponent('parent')->save();
  }
}

/**
 * Removes the workspace association entity and field schema data.
 */
function workspaces_post_update_remove_association_schema_data() {
  // Delete the entity and field schema data.
  $keys = [
    'workspace_association.entity_schema_data',
    'workspace_association.field_schema_data.id',
    'workspace_association.field_schema_data.revision_id',
    'workspace_association.field_schema_data.uuid',
    'workspace_association.field_schema_data.revision_default',
    'workspace_association.field_schema_data.target_entity_id',
    'workspace_association.field_schema_data.target_entity_revision_id',
    'workspace_association.field_schema_data.target_entity_type_id',
    'workspace_association.field_schema_data.workspace',
  ];
  \Drupal::keyValue('entity.storage_schema.sql')->deleteMultiple($keys);
}