Error in mysql migration
using "drizzle-orm": "0.31.2", "drizzle-kit": "0.22.8",
drizzle.config.ts file, it is in root folder of project
connection file
Everything working fine.
Created the schemas file for db, drizzle-kit push worked fine, all table created successfully and drizzle-kit generate generated first random1.sql file in drizzle folder.
Then a column value type has to be changed, changes done in schema and drizzle-kit generate also generated another random2.sql file with only alter command in it.
db-migration.ts
now pnpm tsx db-migration.ts command is failing with table already exist error.
It is try to run 1st genereated random1.sql file first and failing with error.
Need to know what I am doing wrong here?
1 Reply