rsrahul
rsrahul
DTDrizzle Team
Created by rsrahul on 4/8/2024 in #help
Messed up my migrations - Need help
Hello, I am new to Drizzle (in general new to SQL world). Using drizzle with turso db. I had few tables and recently added one new table (say T10) and updated existing table (say T9). For some reason, I have deleted the migrations folder and now I am reading that we are not supposed to do that. When I run
drizzle-kit push:sqlite --config=./src/db/drizzle.config.ts
drizzle-kit push:sqlite --config=./src/db/drizzle.config.ts
It is trying to create all the existing tables and giving me below error:
SQL input error: table `T1 already exists (at offset 13)
SQL input error: table `T1 already exists (at offset 13)
How to: - migrate the only changed schema to turso db (that is: create table T10 and alter table T9) - Do I need to re-populate the migrations folder upto date as per db ? if yes how? Help is much appreciated! Thank you #help
4 replies