# sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: users.age

- **ID:** `python/sqlalchemy-no-such-column`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The ORM model defines a column that does not exist in the database table, or the table schema is outdated.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **Use Alembic migrations to add the column** (95% success)
   ```
   alembic revision --autogenerate -m "add age column"
alembic upgrade head
   ```
2. **Drop and recreate the table if in development** (85% success)
   ```
   Base.metadata.drop_all(engine)
Base.metadata.create_all(engine)
   ```

## Dead Ends

- **Adding the column manually via raw SQL without updating the model** — The model may still reference the old schema if not refreshed. (65% fail)
- **Ignoring the error and assuming it's transient** — The error will persist until the schema is updated. (100% fail)
