drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: precise migrations with code

Open
#4,226 9 comments 2 reactions 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

### Feature hasn't been suggested before.

- [x] I have verified this feature I'm about to request hasn't been suggested before.

### Describe the enhancement you want to request

drizzle is great, it's dynamic design is perfect for my case.
(no need to putting all tables when initialization)

I wrote a wrapper for drizzle as a plugin for the framework I use.
But I need to do create table(migrations) while only know exactly one single table.

So use `pushSQLiteSchema({ table: ... })` will remove all other tables,
I try to use `generateSQLiteMigration()`,
but I didn't have value for the `prev` parameter in `generateSQLiteMigration()`,
because `sqlitePushIntrospect()` is not exported.

**TL;DR**
`pushSQLiteSchema()` needs all tables, otherwise other tables is gone.

`generateSQLiteMigration()` functions is exported, but can't call `sqlitePushIntrospect()` for `prev`

If I could access `sqlitePushIntrospect`,
I could filter out other tables and prevent accidentally removing other tables.

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.