mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-11 15:08:36 +02:00
adjust conflict to be on unit<>period and add list endpoints for providers
This commit is contained in:
@@ -1746,10 +1746,15 @@ export const aiBudgets = pgTable(
|
||||
updatedAt: bigint("updatedAt", { mode: "number" }).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