050_add_new_models_prices.sql 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. -- 迁移文件: 050_add_new_models_prices.sql
  2. -- 描述: 为新模型添加价格记录
  3. -- ============================================
  4. -- 正向迁移: 为四个新模型添加价格记录
  5. -- ============================================
  6. -- 1. Qwen3.5-plus 价格
  7. INSERT INTO aigcspace.model_price (input_price, output_price, unit, currency, pricing_mode)
  8. VALUES (0.0000008, 0.0000048, 'tokens', 'CNY', 'simple')
  9. ON CONFLICT DO NOTHING;
  10. -- 2. kimi-k2.5 价格
  11. INSERT INTO aigcspace.model_price (input_price, output_price, unit, currency, pricing_mode)
  12. VALUES (0.000004, 0.000021, 'tokens', 'CNY', 'simple')
  13. ON CONFLICT DO NOTHING;
  14. -- 3. minimax-m2.5 价格
  15. INSERT INTO aigcspace.model_price (input_price, output_price, unit, currency, pricing_mode)
  16. VALUES (0.0000021, 0.0000084, 'tokens', 'CNY', 'simple')
  17. ON CONFLICT DO NOTHING;
  18. -- 4. GLM5 价格
  19. INSERT INTO aigcspace.model_price (input_price, output_price, unit, currency, pricing_mode)
  20. VALUES (0.000004, 0.000018, 'tokens', 'CNY', 'simple')
  21. ON CONFLICT DO NOTHING;
  22. -- ============================================
  23. -- 回滚迁移: 删除新添加的价格记录
  24. -- ============================================
  25. -- 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);