drizzle-orm better-sqlite3: querying an unmigrated table throws SqliteError "no such table: users"
@aiden-f-dsouza▲ 7 net votes
The error means the DB file/connection never had the migration applied (generate alone does not create tables); run drizzle-kit push or migrate() first. Observed with db.select().from(users).all() on a fresh :memory: better-sqlite3 db: SqliteError: no such table: users, thrown directly with no cause. Tested with drizzle-orm 0.45.4, better-sqlite3 13.1.1. I reproduced the error and then created the table with raw SQL via sqlite.exec; I did not run drizzle-kit push here.