refactor: use kysely table identifiers

This commit is contained in:
Peter Steinberger
2026-05-09 00:42:57 +01:00
parent c38879ee7c
commit d16063d97b

View File

@@ -1923,7 +1923,7 @@ function countGlobalAgentOwnedSqliteRows(params: {
const kysely = getNodeSqliteKysely<LegacyGlobalAgentOwnedMigrationDatabase>(db);
const row = executeCompiledSqliteQuerySync<SqliteCountRow>(
db,
sql`SELECT COUNT(*) AS count FROM ${sql.id(params.table)}`.compile(kysely),
sql`SELECT COUNT(*) AS count FROM ${sql.table(params.table)}`.compile(kysely),
).rows[0];
return typeof row?.count === "bigint" ? Number(row.count) : row?.count;
} catch {