Skip to content

Create the extra_property_definition_shop table in the 9.2.0 upgrade script - #1899

Open
jolelievre wants to merge 3 commits into
PrestaShop:7.6.xfrom
jolelievre:extra-property-definition-shop-table
Open

Create the extra_property_definition_shop table in the 9.2.0 upgrade script#1899
jolelievre wants to merge 3 commits into
PrestaShop:7.6.xfrom
jolelievre:extra-property-definition-shop-table

Conversation

@jolelievre

@jolelievre jolelievre commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

Companion to two core PRs touching the extra property registry schema for 9.2.0:

This PR adds the matching DDL to upgrade/sql/9.2.0.sql: the extra_property_definition_shop CREATE TABLE IF NOT EXISTS right below the extra_property_definition registry table it references, and the table_name column in that registry table's definition — both with the same column definitions and keys as the install structure.

No data seeding is needed: the absence of association rows is the shop feature's backward-compatible default ("no explicit restriction"), and a NULL table_name falls back to the entity name, which is correct for every definition created before #42538 (conventional naming was the only possibility).

How to test

  • Upgrade a 9.1.x shop to a 9.2.0 build containing both core PRs (or execute the new statements against a 9.2.0 database): SHOW CREATE TABLE ps_extra_property_definition_shop returns the table with the composite (id_extra_property_definition, id_shop) primary key and the id_shop key, and SHOW COLUMNS FROM ps_extra_property_definition LIKE 'table_name' returns the nullable varchar(64) column — identical to a fresh install.
  • Running the script twice raises no error (CREATE TABLE IF NOT EXISTS).
  • On the upgraded shop with multistore enabled, Advanced Parameters > Extra Properties renders and saving a store association on a definition persists rows in the new table; registering a definition on the combination entity stores table_name = product_attribute.

Companion of PrestaShop/PrestaShop#42538: the registry now persists the
resolved physical entity table (non-conventional naming support), so the
upgrade DDL must create the column for shops upgrading to 9.2.0.
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked Status: The issue is blocked by another task Migration script

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

3 participants