All checks were successful
Build and Deploy / deploy (push) Successful in 1m26s
产品配置可上传 CoverImage,门户精选线路目录返回封面 URL。 Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
628 B
SQL
21 lines
628 B
SQL
-- 销售产品:官网线路封面图(产品配置可上传;门户精选线路卡片背景)
|
|
-- 可重复执行
|
|
|
|
SET @db := DATABASE();
|
|
|
|
SET @exists := (
|
|
SELECT COUNT(1)
|
|
FROM information_schema.COLUMNS
|
|
WHERE TABLE_SCHEMA = @db
|
|
AND TABLE_NAME = 't_sales_product'
|
|
AND COLUMN_NAME = 'CoverImage'
|
|
);
|
|
SET @sql := IF(
|
|
@exists = 0,
|
|
'ALTER TABLE `t_sales_product` ADD COLUMN `CoverImage` VARCHAR(512) NULL COMMENT ''官网线路封面图 object key'' AFTER `ProductDescription`',
|
|
'SELECT ''t_sales_product.CoverImage already exists'' AS info'
|
|
);
|
|
PREPARE stmt FROM @sql;
|
|
EXECUTE stmt;
|
|
DEALLOCATE PREPARE stmt;
|