From 40ccdad4295dc5160b25889e72d0b9c19b5253aa Mon Sep 17 00:00:00 2001 From: Jonathan Danse Date: Thu, 25 Jun 2026 16:21:37 +0200 Subject: [PATCH] Add per-combination virtual flag + downloadable files migration to 9.2.0 Companion to PrestaShop/PrestaShop#41825: adds product_attribute.is_virtual (per-combination virtual flag) and id_product_attribute to product_download (one downloadable file per combination), relaxing its unique key. Co-Authored-By: Claude Opus 4.8 --- upgrade/sql/9.2.0.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/upgrade/sql/9.2.0.sql b/upgrade/sql/9.2.0.sql index 7922383f3..695ac20ea 100644 --- a/upgrade/sql/9.2.0.sql +++ b/upgrade/sql/9.2.0.sql @@ -154,3 +154,9 @@ CREATE TABLE IF NOT EXISTS `PREFIX_b2b_role_authorization_role` ( INSERT INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position`) VALUES (NULL, 'actionCheckoutBuildProcess', 'Build checkout process', 'This hook is triggered before the checkout is rendered. Modules may return a checkout process provider. The provider is used only when exactly one enabled and valid provider is available.', '1') ON DUPLICATE KEY UPDATE `title` = VALUES(`title`), `description` = VALUES(`description`); + +-- https://github.com/PrestaShop/PrestaShop/pull/41825 +-- Per-combination virtual flag and downloadable files (one file per combination) +ALTER TABLE `PREFIX_product_attribute` ADD COLUMN `is_virtual` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; +ALTER TABLE `PREFIX_product_download` ADD COLUMN `id_product_attribute` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `id_product`; +ALTER TABLE `PREFIX_product_download` DROP INDEX `id_product`, ADD UNIQUE KEY `id_product` (`id_product`, `id_product_attribute`);