monorepo migration folder bundling
I have a turborepo monorepo. Trying to have db as a separate internal package along with its migrations folder but the migrate function uses the migrations folder from the client app rather than the package itself
9 Replies
Where is initialMigration?
From where is it executed?
Reading it like that, I guess it tries to migrate the content of a drizzle folder one level up from this function's location.
initialMigration declaration is in the package
but is called from the app
I would try a path from the root of the repository. I wonder if someone already did that
GitHub
GitHub - BenBestmann/drizzle-monorepo
Contribute to BenBestmann/drizzle-monorepo development by creating an account on GitHub.
He seems to have the same issues
Now I want to try it myself 😏
yeah
found one other as well
Stack Overflow
How to best manage migrations with Drizzle ORM in a Monorepo?
How do you best manage/execute database migrations if the same database is being used within multiple projects?
Some background:
I have a project with a monorepo structure build with Turborepo on t...
tried getting it thru absolute paths rather than relative one but __dirname doesnt work with nextjs
since the dev is running in a .next folder
rather than the project root
come up with this
seems to be a weird issue
It doesn’t surprise me but I agree it would be better to have something simpler (in turbo or some args on migrate)