fix(data): 修复 global_models 插入时缺少 usage_count 字段导致的列数不匹配问题

This commit is contained in:
fawney19
2026-04-17 01:09:14 +08:00
parent 1e0bc61526
commit 05ab09c469

View File

@@ -649,11 +649,12 @@ INSERT INTO global_models (
default_price_per_request, default_price_per_request,
default_tiered_pricing, default_tiered_pricing,
supported_capabilities, supported_capabilities,
usage_count,
config, config,
created_at, created_at,
updated_at updated_at
) )
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, NOW(), NOW()) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, NOW(), NOW())
RETURNING id RETURNING id
"#, "#,
) )
@@ -664,6 +665,7 @@ RETURNING id
.bind(record.default_price_per_request) .bind(record.default_price_per_request)
.bind(record.default_tiered_pricing.clone()) .bind(record.default_tiered_pricing.clone())
.bind(record.supported_capabilities.clone()) .bind(record.supported_capabilities.clone())
.bind(0_i32)
.bind(record.config.clone()) .bind(record.config.clone())
.fetch_optional(&self.pool) .fetch_optional(&self.pool)
.await .await