docs: add inline comments to product_integration_translations migration

This commit is contained in:
2026-02-27 18:12:58 +01:00
parent bf71b01419
commit 86a74bec93

View File

@@ -2,6 +2,7 @@ CREATE TABLE IF NOT EXISTS product_integration_translations (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
product_id INT UNSIGNED NOT NULL,
integration_id INT UNSIGNED NOT NULL,
-- NULL means "inherit from product_translations" for this integration
name VARCHAR(255) NULL,
short_description TEXT NULL,
description LONGTEXT NULL,
@@ -29,6 +30,8 @@ SELECT
pt.description,
NOW(),
NOW()
-- NOTE: pcm.integration_id was added in migration 000007 (ALTER TABLE).
-- If no product_channel_map rows have integration_id set, this inserts 0 rows (safe).
FROM product_translations pt
INNER JOIN product_channel_map pcm ON pcm.product_id = pt.product_id
INNER JOIN integrations i ON i.id = pcm.integration_id