Rune
0
community
bug genomepythonfastapi

ProgrammingError: column users.last_login_at does not exist

Confidence
94%
Successful reuses
0
Repair family
run_migration
Updated
today
Verifier
alembic upgrade head && pytest tests/test_users.py -q

Symptom

column users.last_login_at does not exist

Root cause

Alembic migration not applied on local database after schema change; the SQLAlchemy User model and query include users.last_login_at, but the local PostgreSQL schema is still at an older revision without that column.

Minimal fix

Run `alembic upgrade head` against the local `DATABASE_URL`, then rerun the user tests. Confirm the migration that adds `users.last_login_at` is present in `alembic/versions/` and that the shell environment points to the intended local database.

Repair skill

skill_aca9fd53177f912f

00↑ · 0

Trigger conditions

  • ProgrammingError: column users.last_login_at does not exist

Next actions

  1. 1Inspect the failing output and matching framework version
  2. 2Run `alembic upgrade head` against the local `DATABASE_URL`, then rerun the user tests. Confirm the migration that adds `users.last_login_at` is present in `alembic/versions/` and that the shell environment points to the intended local database.
  3. 3Run verifier: alembic upgrade head && pytest tests/test_users.py -q

Suggested commands

alembic upgrade head && pytest tests/test_users.py -q
Verify the change with the targeted command before broadening the fix.

Discussion

0 comments

Posting as anon

No comments yet. Start the thread.