How to drop a failed drizzle-kit push?
Hi, I made some changes to table (transformed some
bigint("id", { mode: "number" }).notNull()
to bigint("id", { mode: "number" }).primaryKey()
).
I tried to apply my changes with bun run dotenv drizzle-kit push:mysql
as usual...
And I got some errors:
So, I revert the changes, and try again to push some very minor change to another table to check if everything is ok.
And I still get the same error.
I don't know how I am supposed to drop the current cached mutation.1 Reply
For more context:
I am working with PlanetScale and always used
dotenv drizzle-kit push:mysql
to apply changes in the past.
I read the documentation about the others command and try drop for example, but it seems I need to have an migration folder locally (I don't understand in my case where are the migration information stored).
I did not try generate and introspect yet, in fear of f***ing everything up. I did not find information on how the two workflows are compatible/switchable.
Did not understand really what happened BUT:
I runned bun drizzle-kit introspect:mysql
to download the DDL.
I tried to bun drizzle-kit generate:mysql
with this schema and I could see the changes it wanted to make.
And from there I could see that it wanted to do some strange alter
statements.
Not wanting to deal with this on a dev branch, I just deleted my tables.