drizzle-team / drizzle-team/drizzle-orm

How can I always generate a single migration file, with `drizzle-kit`?

Open
#3,346 3 comments 1 reaction 0 assignees View on GitHub
drizzle/kit enhancement
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

I've got a use case where, instead of using `drizzle-kit push` to directly update the database,. I instead want to generate a sql file from the schema and store that in the migrations folder.

So in my case, I always want to have a single source of truth for the schema in a SQL file.

I want to do it like this way, because I will then create more migration files on my own for other SQL statements that drizzle doesn't support yet. i.e. postgres policies, postgres functions, etc.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.