This is a tricky one.

At the moment Multiversion module attaches some custom but required fields (see MultiversionManager::attachRequiredFields()) to all content entities (actually just nodes at the moment) to handle the multiversion revision system. For performance reasons we want these fields to be converted to base properties for each content entity type. This would also just make the system a lot cleaner.

The tricky part is installation order and handling changes in the entity schema when Multiversion module suddenly gets installed, e.g. we then have to go in and alter all entity schemas to add our new base properties and fill existing entities in with values for these properties in retrospective. At the moment Multiversion will break if it's installed after any entity module. We are cheating a bit to get the tests passing for now, see MultiversionWebTestBase::setUp().
Thankfully big parts of this problem is being solved in core at #1498720: [meta] Make the entity storage system handle changes in the entity and field schema definitions. So Multiversion will critically depend on that functionality.

In this issue we need to build a solution that removes the hack in MultiversionWebTestBase::setUp() and generates/alters each entity schema properly with base properties instead of fields. We should rely on #1498720: [meta] Make the entity storage system handle changes in the entity and field schema definitions for this.

We will likely have to create our own ContentEntitySchemaHandler that our multiversion\Entity\SqlContentEntityStorage would use.

Comments

dixon_’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
dixon_’s picture

Title: Create a new ContentEntitySchemaHandler and convert required fields into base properties » Convert required fields into base properties

Looking further into this is seems like we don't need a new schema handler, since the existing one handles things nicely.

dixon_’s picture

Title: Convert required fields into base properties » Convert required bundle fields into base fields
dixon_’s picture

dixon_’s picture

Status: Active » Needs work
dixon_’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.