DrizzleKit "tablesFilter" not working as expected

Hello! I am trying to use the "tablesFilter" feature in DrizzleKit, but I may be misunderstanding how it works? When I run "drizzle-kit push" with the following configuration it still tries to drop and/or reconcile tables that do not have the defined prefixes. I thought that it would create a sandbox in which it would not try to touch anything that does not match the filter? Am I doing it wrong?
import { defineConfig } from 'drizzle-kit'
import { dbUrl } from './src/db-url'

export default defineConfig({
dbCredentials: { url: dbUrl },
dialect: 'postgresql',
schema: './src/tables/*',
out: './src/migrations',
tablesFilter: ['media_service_*'],
})
import { defineConfig } from 'drizzle-kit'
import { dbUrl } from './src/db-url'

export default defineConfig({
dbCredentials: { url: dbUrl },
dialect: 'postgresql',
schema: './src/tables/*',
out: './src/migrations',
tablesFilter: ['media_service_*'],
})
1 Reply
Mario564
Mario5644mo ago
By specifying media_service_* in the tablesFilter key, you're saying that you don't want tables with that prefix to be present in migrations and push. I assume that if those tables were previously present and are being filtered afterwards then it will drop those tables
Want results from more Discord servers?
Add your server