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

onEnittyTypeUpdate updates the installed entity schema without creating new tables or droping removed tables

$
0
0

Problem/Motivation

We track everything returned by \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::getEntitySchema() and therefore we also report changes when tables are added or removed.

However if we perform an entity type update through:

$edum = \Drupal::entityDefinitionUpdateManager();
$edum->updateEntityType($edum->getEntityType($entity_type_id)));

then the installed schema will be updated to include the new tables, but the new tables will not be created and no changes will reported anymore.

Not only this, but there might be a new index on a new table and we are going to try to create it as we currently only auto create and auto delete indexes.

Proposed resolution

As we track the tables anyway and even report changes it makes sense to auto create and auto drop them just like we do with the indexes.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 302037

Trending Articles



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