update
This commit is contained in:
17
migrations/028_products_custom_label_1.sql
Normal file
17
migrations/028_products_custom_label_1.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- Migracja: dodanie kolumny custom_label_1 do tabeli products
|
||||
-- Cel: wsparcie edytowalnej kolumny CL1 w widoku /products (analogicznie do custom_label_4)
|
||||
|
||||
SET @sql = IF(
|
||||
EXISTS (
|
||||
SELECT 1
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'products'
|
||||
AND COLUMN_NAME = 'custom_label_1'
|
||||
),
|
||||
'DO 1',
|
||||
'ALTER TABLE `products` ADD COLUMN `custom_label_1` VARCHAR(255) NULL DEFAULT NULL AFTER `min_roas`'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
Reference in New Issue
Block a user