From da49ffc332c005a461f416fcde07622d24adcee5 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Sat, 18 Apr 2026 15:17:20 +0100 Subject: [PATCH] fix orderBy --- apps/server/src/database/repos/base/base-property.repo.ts | 2 +- apps/server/src/database/repos/base/base-row.repo.ts | 2 +- apps/server/src/database/repos/base/base-view.repo.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/server/src/database/repos/base/base-property.repo.ts b/apps/server/src/database/repos/base/base-property.repo.ts index 2b0281d0..53378be8 100644 --- a/apps/server/src/database/repos/base/base-property.repo.ts +++ b/apps/server/src/database/repos/base/base-property.repo.ts @@ -49,7 +49,7 @@ export class BasePropertyRepo { .selectFrom('baseProperties') .select('position') .where('baseId', '=', baseId) - .orderBy(sql`position COLLATE "C"`, sql`DESC`) + .orderBy(sql`position COLLATE "C"`, 'desc') .limit(1) .executeTakeFirst(); return result?.position ?? null; diff --git a/apps/server/src/database/repos/base/base-row.repo.ts b/apps/server/src/database/repos/base/base-row.repo.ts index 8096c2f8..62f2b5ff 100644 --- a/apps/server/src/database/repos/base/base-row.repo.ts +++ b/apps/server/src/database/repos/base/base-row.repo.ts @@ -124,7 +124,7 @@ export class BaseRowRepo { .where('baseId', '=', baseId) .where('workspaceId', '=', opts.workspaceId) .where('deletedAt', 'is', null) - .orderBy(sql`position COLLATE "C"`, sql`DESC`) + .orderBy(sql`position COLLATE "C"`, 'desc') .limit(1) .executeTakeFirst(); return result?.position ?? null; diff --git a/apps/server/src/database/repos/base/base-view.repo.ts b/apps/server/src/database/repos/base/base-view.repo.ts index 0ad04428..a799a055 100644 --- a/apps/server/src/database/repos/base/base-view.repo.ts +++ b/apps/server/src/database/repos/base/base-view.repo.ts @@ -67,7 +67,7 @@ export class BaseViewRepo { .select('position') .where('baseId', '=', baseId) .where('workspaceId', '=', opts.workspaceId) - .orderBy(sql`position COLLATE "C"`, sql`DESC`) + .orderBy(sql`position COLLATE "C"`, 'desc') .limit(1) .executeTakeFirst(); return result?.position ?? null;