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:
Error: target: snacs.-.primary: vttablet: rpc error: code = Unknown desc = Check constraint 'id' is not found in the table. (errno 3821) (sqlstate HY000) (CallerID: q7b5b4s79a6trurkk7ej): Sql: "alter table snacs_food_attribute drop check id", BindVars: {REDACTED}
    at PromiseConnection.query (/home/lelabo/DEV/SNACS/willitfodmap/node_modules/drizzle-kit/index.cjs:35481:26)
    at Command.<anonymous> (/home/lelabo/DEV/SNACS/willitfodmap/node_modules/drizzle-kit/index.cjs:53292:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: undefined,
  errno: 3821,
  sql: 'ALTER TABLE `snacs_food_attribute` DROP CONSTRAINT `id`;',
  sqlState: 'HY000',
  sqlMessage: `target: snacs.-.primary: vttablet: rpc error: code = Unknown desc = Check constraint 'id' is not found in the table. (errno 3821) (sqlstate HY000) (CallerID: q7b5b4s79a6trurkk7ej): Sql: "alter table snacs_food_attribute drop check id", BindVars: {REDACTED}`
}


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.
Was this page helpful?