Account created on 24 May 2018, over 6 years ago
#

Recent comments

This is great! I have now tried it with the node, commerce_store, commerce_product, commerce_order and taxonomy_term entities and it works with all of them.

Checking if an entity is revisionable by
$is_revisionable = $storage->getEntityType()->isRevisionable();
seems to work both for commerce_store and node entity at least.

Regarding the setting the flag according to the issue you linked, I guess that would make it a bit less resource intensive when wiping the tables that have data in them if there are a lot of rows. Instead of extracting all data into an array and then re-adding it to the table after alteration it should be possible to just add/remove the column in the db and the entity storage without handling any data.

Thanks for the quick feedback! The patch works for custom field set to commerce_store (both addColumn and removeColumn, both with and without field data) but if I try to run the addColumn function for a node entity with data set for the field it now skips altering the revision table and therefore throws the sql exception that field storage for fields with data cannot be changed.
Checking the RevisionableInterface for entity storage (line 198 with patch) seems to not work for NodeStorage. I am not sure about the storage for other entities.

This unfortunately also seems to wipe the entire field table since the existing data is never restored when the exception is thrown.

Production build 0.71.5 2024