fix description

This commit is contained in:
2026-07-29 21:46:48 +03:30
parent e8651135d1
commit f921e97466
5 changed files with 60 additions and 7 deletions
+4 -2
View File
@@ -7,11 +7,13 @@ START TRANSACTION;
SET @db = DATABASE();
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
SET @sql = IF(
(SELECT COUNT(*) FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'products' AND COLUMN_NAME = 'description') = 0,
'ALTER TABLE `products` ADD COLUMN `description` TEXT NULL',
'SELECT ''skip products.description'' AS info'
'ALTER TABLE `products` ADD COLUMN `description` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL',
'ALTER TABLE `products` MODIFY COLUMN `description` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL'
);
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;