From 86a74bec936e5d2ab9844b017ea2b8e1fdf23d83 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Fri, 27 Feb 2026 18:12:58 +0100 Subject: [PATCH] docs: add inline comments to product_integration_translations migration --- ...20260227_000014_create_product_integration_translations.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/database/migrations/20260227_000014_create_product_integration_translations.sql b/database/migrations/20260227_000014_create_product_integration_translations.sql index 5dd27fa..e473c3c 100644 --- a/database/migrations/20260227_000014_create_product_integration_translations.sql +++ b/database/migrations/20260227_000014_create_product_integration_translations.sql @@ -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