LOADING…
0%
Complete changelog

Commit

fix: use explicit column selection in auth queries to prevent schema mismatch errors

Commit details

Commit notes

The production database query was failing because Drizzle ORM's findFirst() and returning() methods were trying to select all columns defined in the schema, including Mollie Connect columns (mollie_onboarding_status, etc.) that may not exist in all database environments.

This fix: - Adds authUserColumns constant for SELECT queries with explicit column selection - Adds authUserReturning constant for INSERT/UPDATE RETURNING clauses - Updates all user queries in auth routes to use explicit column selection - Creates AuthUser interface to type the partial user data properly

This makes the auth code resilient to schema mismatches between the ORM schema and the actual database state, which can occur when migrations haven't been applied to production yet.

Co-authored-by: armin.naimi <[email redacted]>

Files changed
1
Lines added
+81
Lines removed
−10
This page is a permanent record of commit 0064f1fc.