Magento 2 – Schema Changes for EE Catalog Staging

catalog-stagingeavmagento-enterprisemagento2

Does Magento 2's "EE Catalog Staging" feature rename the entity_id column of the catalog_product_entity_datetime table to row_id?

An old client recently reached out to me to say, after upgrading to Magento 2.1.1 with the EE Catalog Staging feature, that they're seeing the following errors related to some custom code.

Column not found: 1054 Unknown column 'main_table.entity_id' in 'field list'

and tell me their catalog_product_entity_datetime table's entity_id column is gone, replaced by a row_id column.

+--------------+----------------------+------+-----+---------+----------------+
| Field        | Type                 | Null | Key | Default | Extra          |
+--------------+----------------------+------+-----+---------+----------------+
| value_id     | int(11)              | NO   | PRI | NULL    | auto_increment |
| attribute_id | smallint(5) unsigned | NO   | MUL | 0       |                |
| store_id     | smallint(5) unsigned | NO   | MUL | 0       |                |
| row_id       | int(10) unsigned     | NO   | MUL | NULL    |                |
| value        | datetime             | YES  |     | NULL    |                |
+--------------+----------------------+------+-----+---------+----------------+

I"m (obviously) following up with my client on this one for more information — but is this true? Did Magento EE initiate a schema change here?

Best Answer

Yes, Magento EE Staging modules change the schema on install. See: app/code/Magento/CatalogStaging/Setup/InstallSchema.php for datails.

Related Topic