<<

NAME

ProductOpener::ProductSchemaChanges - convert product data between different schema versions

DESCRIPTION

ProductOpener::ProductSchemaChanges is used to convert product data between different schema versions.

It can convert older product data (e.g. from old revisions of products) to the current schema version.

And for API backward compatibility, it can also convert the current product data to older schema versions.

Schema version numbering

Starting from March 2024, we will now include a new field in the product data called "schema_version", which will be an integer, starting at 1001.

The schema version will be incremented by 1 each time we make a change to the product data schema.

Products without a schema_version field will be considered to be at a schema version under 1000

Schema conversion functions

We will keep a list of functions that can convert product data between different schema versions.

FUNCTIONS

convert_product_schema ($product_ref, $to_version)

Convert product data between different schema versions.

998 to 999 - Change in barcode normalization

Change in normalization of leading 0s.

999 to 1000 - Rename ecoscore fields to environmental_score fields - API v3.1

2024/12/12 -

1000 to 1001 - Remove the ingredients_hierarchy field - API v3.2

2012/03/14

- Remove the ingredients_hierarchy field, which was a duplicate of the ingredients_tags field - Taxonomize brands

<<