Repository navigation
Replies: 2 comments
|
tablesFilter isn't doing anything to To exclude it reliably today, keep the partitioned table in its own module that the |
|
Of course. Your observation is correct for the versions you listed. tablesFilter is not used by drizzle-kit generate. The current Drizzle documentation explicitly scopes tablesFilter to push and pull (introspection), not generate. generate works differently: it reads the TypeScript schema files, builds a schema snapshot, and diffs that against the previous migration snapshot. So these won't exclude mytable from generate: This is also consistent with a June 2026 Drizzle discussion specifically describing the behavior in drizzle-orm@1.0.0-rc.x / drizzle-kit@1.0.0-beta.x; another user reported that positive filters had no effect on generate either. |
Uh oh!
There was an error while loading. Please reload this page.
I have a table (
mytable) that is partitioned via custom SQL and managed outside of drizzle-kit.I want drizzle-kit to ignore it during
generateso it doesn't emitCREATE TABLE notificationsin migrations.I tried
tablesFilter: ['!mytable']and['*', '!mytable']indrizzle.config.tsbut the table still appears in the generated SQL.My workaround was to remove the table's export from the schema index file, which works but feels wrong.
Question: Is there a supported way to exclude a specific table from migration generation (not just introspection)?
Is
tablesFiltersupposed to work forgenerate, or only forpush/introspect?drizzle-orm: 1.0.0-rc.x
drizzle-kit: 1.0.0-beta.x
All reactions