14 lines
586 B
SQL
14 lines
586 B
SQL
-- 将图片生成模板分辨率统一为上游 GPT-Image-2 要求的小写档位。
|
|
ALTER TABLE product_image_templates
|
|
DROP CONSTRAINT IF EXISTS chk_product_image_template_resolution;
|
|
|
|
UPDATE product_image_templates
|
|
SET resolution = lower(resolution);
|
|
|
|
ALTER TABLE product_image_templates
|
|
ALTER COLUMN resolution SET DEFAULT '1k',
|
|
ADD CONSTRAINT chk_product_image_template_resolution
|
|
CHECK (resolution IN ('1k', '2k', '4k'));
|
|
|
|
COMMENT ON COLUMN product_image_templates.resolution IS '生成图片分辨率档位,使用上游要求的 1k、2k 或 4k 小写值';
|