ashutosh_dev
DTDrizzle Team
•Created by ashutosh_dev on 10/9/2024 in #help
Setting Procedures and Triggers and custom SQLs
Hi. I am using drizzle with mysql in ts,
I want to add functionality of procedures and trigger them after specific db calls. How to do it? and if i change something in procedure like edit/delete/add how to handle it's migration.
In on case i have table and it has primary key which is autoincreement but i need to start the count from 1000, how to handle this and If I add something like this to other table after deploying my database how to handle it's migration
1 replies
DTDrizzle Team
•Created by ashutosh_dev on 7/15/2024 in #help
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?
2 replies