drizzle-kit skill issues
So I had several schema files under a folder, all the past migrations were ok, today i wrote new migrations, and edited a file called
school.ts
to schools.ts
to be consistent with other file names (plural), when I did drizzle-kit gnerate it said couldnt find the old school.ts
, i said fine and reverted back to school.ts
i do generate again and now saying schools.ts
is missing, so now i have both school.ts
and schools.tx
the migration passed with both files but i dont think this is right
I cleared node_modules and pnpm cache nothing, reinstalled deps dint work, am on nextjs, turborepo
so right now i comment out school.ts
so i dont import it and when i need to do migrations i have to uncomment it🥲4 Replies
Migrations shouldn't depend on your Typescript file structure
What are in these
school.ts
and schools.ts
file
I think you need to search your whole project to check for all references to the school.ts
file and change all of them to schools.ts
I have already changed them everywhere the whole project builds successfully
Just the migration not working
Here's the schemas
https://github.com/tracepanic/luzin/tree/main/apps/web/src/db/schema
I just cloned your repo, and I don't have this problem. I ran
pnpm -F web exec drizzle-kit migrate
(what command did you run?)
so something might have gone wrong with your TurboRepo or pnpm cache maybe
Honestly maybe worth a push all work to Github, then re-clone to a different folder, and re-install dependenciesI just did pnpm drizzle-kit generate
Inside the web app
Yeah let me try that out
Thanks a lot that worked