# Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such column: x'

- **ID:** `dotnet/ef-core-sqlite-no-net-changes`
- **Domain:** dotnet
- **Category:** data_error
- **Error Code:** `0x80004005`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Entity Framework Core migrations are not applied to the SQLite database, so the actual schema does not match the model expectations, causing queries to reference non-existent columns.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| EF Core 6.0 | active | — | — |
| EF Core 7.0 | active | — | — |
| EF Core 8.0 | active | — | — |
| SQLite 3.x | active | — | — |

## Workarounds

1. **Run 'dotnet ef database update' from the project directory to apply all pending migrations to the SQLite database.** (85% success)
   ```
   Run 'dotnet ef database update' from the project directory to apply all pending migrations to the SQLite database.
   ```
2. **If migrations are missing, create an initial migration: 'dotnet ef migrations add InitialCreate' then run update.** (90% success)
   ```
   If migrations are missing, create an initial migration: 'dotnet ef migrations add InitialCreate' then run update.
   ```

## Dead Ends

- **Adding a new migration and updating the database without reconciling the migration history** — The migration history table in SQLite may be out of sync, causing EF to skip pending migrations. (30% fail)
- **Deleting the database file and recreating it manually** — This loses all data and the migration history, but the error persists if the schema is not recreated via migrations. (50% fail)
