Merge pull request #9 from jjbrunton/staging

fix(api): keep auth sync timestamps monotonic
This commit is contained in:
jjbrunton authored and GitHub committed 2026-08-29 23:57:39 +01:00
commit fd38b303f0
1 file changed
+4 -1
+4 -1
View File
@@ -83,7 +83,10 @@ export class PostgresRepository implements ApiRepository {
target: profiles.id,
set: {
email: sql`coalesce(excluded.email, ${profiles.email})`,
authSyncedAt: new Date(),
// Keep the write on the same clock as the column default. API and
// PostgreSQL hosts can differ slightly, which must not move this
// monotonic sync marker backwards.
authSyncedAt: sql`now()`,
},
}).returning();