mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-12 07:20:43 +02:00
adjust conflict to be on unit<>period and add list endpoints for providers
This commit is contained in:
@@ -1732,10 +1732,15 @@ export const aiBudgets = sqliteTable(
|
||||
updatedAt: integer("updatedAt").notNull()
|
||||
},
|
||||
(t) => [
|
||||
unique("ai_budget_provider_uniq").on(t.providerId),
|
||||
unique("ai_budget_model_uniq").on(t.modelId),
|
||||
unique("ai_budget_resource_uniq").on(t.resourceId),
|
||||
unique("ai_budget_site_resource_uniq").on(t.siteResourceId)
|
||||
unique("ai_budget_provider_uniq").on(t.providerId, t.unit, t.period),
|
||||
unique("ai_budget_model_uniq").on(t.modelId, t.unit, t.period),
|
||||
unique("ai_budget_resource_uniq").on(t.resourceId, t.unit, t.period),
|
||||
unique("ai_budget_site_resource_uniq").on(
|
||||
t.siteResourceId,
|
||||
t.unit,
|
||||
t.period
|
||||
),
|
||||
unique("ai_budget_role_uniq").on(t.roleId, t.unit, t.period)
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user