-- 迁移文件: 050_add_new_models_prices.sql
-- 描述: 为新模型添加价格记录

-- ============================================
-- 正向迁移: 为四个新模型添加价格记录
-- ============================================

-- 1. Qwen3.5-plus 价格
INSERT INTO aigcspace.model_price (input_price, output_price, unit, currency, pricing_mode)
VALUES (0.0000008, 0.0000048, 'tokens', 'CNY', 'simple')
ON CONFLICT DO NOTHING;

-- 2. kimi-k2.5 价格
INSERT INTO aigcspace.model_price (input_price, output_price, unit, currency, pricing_mode)
VALUES (0.000004, 0.000021, 'tokens', 'CNY', 'simple')
ON CONFLICT DO NOTHING;

-- 3. minimax-m2.5 价格
INSERT INTO aigcspace.model_price (input_price, output_price, unit, currency, pricing_mode)
VALUES (0.0000021, 0.0000084, 'tokens', 'CNY', 'simple')
ON CONFLICT DO NOTHING;

-- 4. GLM5 价格
INSERT INTO aigcspace.model_price (input_price, output_price, unit, currency, pricing_mode)
VALUES (0.000004, 0.000018, 'tokens', 'CNY', 'simple')
ON CONFLICT DO NOTHING;

-- ============================================
-- 回滚迁移: 删除新添加的价格记录
-- ============================================
-- DELETE FROM aigcspace.model_price WHERE (input_price = 0.0018 AND output_price = 0.0069) OR (input_price = 0.0008 AND output_price = 0.0048) OR (input_price = 0.00022 AND output_price = 0.00022);