Skip to content

Commit cd94c31

Browse files
PrestaEditclaude
andcommitted
Add virtual_combinations migration to 9.2.0 upgrade SQL
Companion to PrestaShop/PrestaShop#41825: adds id_product_attribute to product_download, relaxes its unique key, and extends product.product_type with virtual_combinations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7f0d43b commit cd94c31

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

upgrade/sql/9.2.0.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,9 @@ CREATE TABLE IF NOT EXISTS `PREFIX_b2b_role_authorization_role` (
106106

107107
-- https://github.com/PrestaShop/PrestaShop/pull/41028
108108
/* PHP:ps_920_business_entities_tabs(); */;
109+
110+
/* https://github.com/PrestaShop/PrestaShop/pull/41825 */
111+
/* virtual_combinations product type: one downloadable file per combination */
112+
ALTER TABLE `PREFIX_product_download` ADD COLUMN `id_product_attribute` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `id_product`;
113+
ALTER TABLE `PREFIX_product_download` DROP INDEX `id_product`, ADD UNIQUE KEY `id_product` (`id_product`, `id_product_attribute`);
114+
ALTER TABLE `PREFIX_product` MODIFY `product_type` ENUM('standard', 'pack', 'virtual', 'combinations', 'virtual_combinations', '') NOT NULL DEFAULT '';

0 commit comments

Comments
 (0)