drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: Ability to filter / manage tables by schema on drizzle-kit push / pull

Open
#3,967 0 comments 2 reactions 0 assignees View on GitHub
db/postgres drizzle/kit enhancement priority
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

It would be nice if one should be able to **filter tables by schema**, when choosing the tables that will be managed by `drizzle-kit push` or `drizzle-kit pull`.

For instance, my project uses Supabase and I need to manage all the tables inside public schema, but also only the `objects` table inside `storage` schema (reason: to apply and manage access control policies).

If i do `schemaFilter: ["public", "storage"]` on `drizzle.config.ts`, when I call `npx drizzle-kit push` Drizzle wants to drop all other tables inside `storage` schema, since I'm not defining / managing them inside my code.

And using only the `tablesFilter` would be a pain, since I would have to check the list of filtered tables every time I change my database schema.

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.