`no such table: main.__old_push_projects` after db push
Added the following to a table named
service
:
and ran pnpm drizzle-kit push:sqlite
it warned:
__old_push_projects
is never mentioned in my codebase. I have a table named projects
, and thats the closest thing.
now my server errors with:
"no such table: main.__old_push_projects"What is this table supposed to be and how can I get it back?
9 Replies
When does it show that error?
stack trace
![No description](https://cdn.answeroverflow.com/1192311389788844055/image.png)
seems like this is duplicate of: https://discord.com/channels/1043890932593987624/1158505696166428772/1158505696166428772
i cant even find in the drizzle-orm source code any references to
__old_push
or __old
and searching for __ NOT __drizzle
comes up with nothing useful (using github search)
so im very confused as to where the old_push gets added in
searching ` AND push` comes up with nothing good eitherI believe this is drizzle-kit
But the error shows up when you query the database?
I got the same issue here, when I try to add a new user to the database
@Andrew Sherman
i deleted the old database and created a brand new one (I'm using better-sqlite3)
the only difference is that the old database also has a table called
__old_push_sessions
while the new one has no __old_push_
tables
looking closer at the stack trace, i think the error is coming from somewhere else in my code:
actually ignore this, my stack trace is being very weird -- code completely unrelated to the issue for some reason is part of the trace.try to create migration file
migrate.ts
with something like this:
and change migrate script to:
yarn tsx ./migrate.ts
I had same error with turso using drizzle-kit push:sqlite
but had to start with fresh db