0d070ef71fa732a54ca36f9bfec51b423b400d9b
Problem - Dev environment login returned 500: `column "clock_style" does not exist`. Task #20's schema change for the per-user clock style was never applied to the dev DB because `scripts/post-merge.sh` runs `drizzle-kit push` interactively, and drizzle-kit got stuck on a prompt asking whether `app_opens` was a rename of `user_sessions`. When the prompt couldn't be answered, the whole sync exited without applying any pending changes — including the new column. Changes - Applied the missing column directly: `ALTER TABLE users ADD COLUMN IF NOT EXISTS clock_style varchar(30);` (nullable, no default — matches `lib/db/src/schema/users.ts`). Verified column now present. - scripts/post-merge.sh: switched `pnpm --filter db push` → `pnpm --filter db run push-force`. The `push-force` script (already defined in `lib/db/package.json`) passes `--force` to drizzle-kit, which auto-accepts safe operations and treats ambiguous renames as creates — which is the correct behavior for our case (we genuinely have new tables, not renames). This prevents the same class of failure from recurring after future merges. Verification - Restarted the API server. - `POST /api/auth/login` with admin/admin → HTTP 200, returns AuthUser with `clockStyle: null` (frontend already falls back gracefully, no home.tsx change needed). - No new 500s in the API logs. Out of scope (as planned) - Backfilling a default value for existing rows. - Resolving the underlying drizzle-kit `app_opens` rename detection — `--force` sidesteps it correctly.
Description
No description provided
Languages
TypeScript
69.2%
JavaScript
29.2%
CSS
0.6%
Shell
0.6%
Dockerfile
0.2%
Other
0.2%