Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293926

Add an API for converting entity type schemas to (non-)revisionable/(non-)translatable, with or without data

$
0
0

Problem/Motivation

We decided in #2976035-13: [PP-1] Entity type CRUD operations must use the last installed entity type and field storage definitions to drop support for automatic entity updates, for the many reasons stated in that comment.

However, we can add support for changing the entity schema to (non-)revisionable/(non-)translatable by using "manual" entity updates (i.e. explicit update functions), which should work for entity type with and without data.

Proposed resolution

Generalize and improve the code in \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter to not use the live entity type and field storage definitions anymore, and make it work as part of SqlContentEntityStorageSchema instead of trying to work around/against it.

Remaining tasks

Review the proposed solution.

User interface changes

Nope.

API changes

API addition: a new updateEntityTypeSchema(EntityTypeInterface $entity_type, array $field_storage_definitions, array &$sandbox = NULL) method added to EntityDefinitionUpdateManager.

Data model changes

Nope.


Viewing all articles
Browse latest Browse all 293926

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>