refactor: update migrations

This commit is contained in:
Mauricio Siu
2025-01-18 18:29:28 -06:00
parent d5d8064b38
commit ad642ab4e0
22 changed files with 4417 additions and 46 deletions

View File

@@ -239,7 +239,10 @@ export const projectRouter = createTRPCRouter({
}
}),
});
function buildServiceFilter(fieldName: AnyPgColumn, accessedServices: string[]) {
function buildServiceFilter(
fieldName: AnyPgColumn,
accessedServices: string[],
) {
return accessedServices.length > 0
? sql`${fieldName} IN (${sql.join(
accessedServices.map((serviceId) => sql`${serviceId}`),