How do I mark "migration as applied" after using "push"?
I've been using push for a while, now my migrations don't work anymore because:
6 Replies
Hello, @cosbgn! Could you clarify your migrations workflow?
drizzle-kit push
and drizzle-kit generate
are different approaches for migrationsSo I used drizzle-kit push for a while since I had to do a lot of migrations
now I want to switch to generate
Also, with
generate
will drizzle understand/know different databases (e.g. production vs local) or should I add the whole /migrations folder on .gitignoredrizzle creates table for migrations, so you don't have to add folder
what dialect & driver are you using?
sqlite/turso
@cosbgn I reproduced this issue. It is because there is no
IF NOT EXISTS
. Drizzle kit does not add this statement, that's why migrations try to create again table which already exists. You can manually update migrations to fix this problem. There will be option for this in drizzle-kit in the futureThanks