mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-06 04:31:22 +02:00
Remove extra checks
This commit is contained in:
@@ -1693,15 +1693,6 @@ export const aiBudgets = sqliteTable(
|
|||||||
updatedAt: integer("updatedAt").notNull()
|
updatedAt: integer("updatedAt").notNull()
|
||||||
},
|
},
|
||||||
(t) => [
|
(t) => [
|
||||||
check(
|
|
||||||
"ai_budget_one_scope",
|
|
||||||
sql`(
|
|
||||||
(CASE WHEN ${t.providerId} IS NOT NULL THEN 1 ELSE 0 END) +
|
|
||||||
(CASE WHEN ${t.modelId} IS NOT NULL THEN 1 ELSE 0 END) +
|
|
||||||
(CASE WHEN ${t.resourceId} IS NOT NULL THEN 1 ELSE 0 END) +
|
|
||||||
(CASE WHEN ${t.siteResourceId} IS NOT NULL THEN 1 ELSE 0 END)
|
|
||||||
) = 1`
|
|
||||||
),
|
|
||||||
unique("ai_budget_provider_uniq").on(t.providerId),
|
unique("ai_budget_provider_uniq").on(t.providerId),
|
||||||
unique("ai_budget_model_uniq").on(t.modelId),
|
unique("ai_budget_model_uniq").on(t.modelId),
|
||||||
unique("ai_budget_resource_uniq").on(t.resourceId),
|
unique("ai_budget_resource_uniq").on(t.resourceId),
|
||||||
|
|||||||
Reference in New Issue
Block a user