What is the purpose of the _meta directory?

I am currently looking into using drizzle-kit for migrations and was wondering what the _meta directory does. Currently this part of the migration workflow is undocumented leaving several questions unanswered. Initially I tried to inspect the code myself and find out what it is used alas the source code of drizzle-kit is still not available (https://github.com/drizzle-team/drizzle-orm/issues/580). Currently I wonder if it has to be checked in to git, and under what circumstances it is required to read from as well as write to this directory. This would influence how drizzle migrations can/will be deployed on production: Does it have to be part of the deployed code, can it be non-existent, is it only needed for ephemeral data or does it have to persist data (i.e. in docker this would have to be a mounted volume), is it sufficient to only read from there (i.e. in docker this would allow increased security by marking the filesystem as readonly) etc... https://github.com/drizzle-team/drizzle-kit-mirror/issues/196
GitHub
Issues · drizzle-team/drizzle-orm
TypeScript ORM that feels like writing SQL. Contribute to drizzle-team/drizzle-orm development by creating an account on GitHub.
GitHub
Purpose of _meta directory · Issue #196 · drizzle-team/drizzle-ki...
It is unclear what the _meta directory is used for as there is no documentation for it (and the source code is not available yet, see drizzle-team/drizzle-orm#580). Currently I wonder if it has to ...
2 Replies
imoby
imoby12mo ago
I believe a big aspect of it is to define the order of your migrations. each one references previous migration id's especially if they need to happen in order. thats at least 'one' thing it does
Septatrix
Septatrix12mo ago
Based on that I would have to commit it to git but the application does not need to write to it?
Want results from more Discord servers?
Add your server