diff --git a/docs/reference/cli/database.md b/docs/reference/cli/database.md index 3d86e4846..6fc8d1cc2 100644 --- a/docs/reference/cli/database.md +++ b/docs/reference/cli/database.md @@ -7,7 +7,9 @@ outline: deep ## `void db push` {#void-db-push} -Apply your Drizzle schema directly to the development database without creating migration files. D1 updates the local database; PostgreSQL and MySQL use `DATABASE_URL` from `.env`. +Apply your Drizzle schema directly to the development database without creating migration files. D1 updates the local database. PostgreSQL and MySQL use `DATABASE_URL` from `.env`. + +Schema changes that need confirmation require an interactive terminal. Selecting `No, abort` exits with a nonzero status. Use this for quick schema iteration while prototyping. Before deploying, generate and review migration files with `void db generate`. @@ -17,6 +19,8 @@ Generate SQL migration files from schema changes. Compares your schema with the last Drizzle snapshot and writes migrations under `db/migrations/`. It includes Void-managed auth tables and configured auth plugins, even without an application schema. Review and commit the generated files before deploying. +Rename prompts require an interactive terminal. The command exits with a nonzero status if a prompt cannot open or is cancelled. + For SQLite, Void checks that the migration history applies to a fresh database. If generation fails this check, the previous SQL, snapshots, and journal are restored. If an existing migration fails, repair that unapplied migration first: rerunning generation compares snapshots and does not repair existing SQL. This check does not verify that a migration preserves existing data; review table rebuilds and foreign-key actions carefully. ## `void db status` {#void-db-status} diff --git a/packages/void/src/cli/db.ts b/packages/void/src/cli/db.ts index 72ae00a44..773ff612a 100644 --- a/packages/void/src/cli/db.ts +++ b/packages/void/src/cli/db.ts @@ -1,4 +1,4 @@ -import { execFileSync } from 'node:child_process'; +import { spawnSync } from 'node:child_process'; import { existsSync, mkdirSync, @@ -100,18 +100,75 @@ function configuredD1Binding(root: string): string { return resolveBindingNames(readConfig(root).inference?.bindings)?.d1 ?? 'DB'; } -function runDrizzleKit(root: string, args: Array): void { - execFileSync(process.execPath, [drizzleKitBin, ...args], { - cwd: root, - stdio: 'inherit', - }); +const DRIZZLE_UNCHANGED = 2; + +// Drizzle Kit 0.31 can exit 0 after an error or an aborted prompt. +const DRIZZLE_COMPLETION_SCRIPT = String.raw` +const { stripVTControlCharacters } = require('node:util'); +const generating = process.argv[2] === 'generate'; +const noChanges = generating ? 'No schema changes, nothing to migrate 😴' : '[i] No changes detected'; +const migrationWritten = /^\[✓\] Your SQL migration file ➜ .+\.sql 🚀$/su; + +let result = 1; +function recordCompletion(chunk) { + if (typeof chunk !== 'string') return; + const line = stripVTControlCharacters(chunk).trim(); + if (line === noChanges) { + result = ${DRIZZLE_UNCHANGED}; + } else if (generating ? migrationWritten.test(line) : line === '[✓] Changes applied') { + result = 0; + } +} + +const write = process.stdout.write.bind(process.stdout); +process.stdout.write = (chunk, ...args) => { + recordCompletion(chunk); + return write(chunk, ...args); +}; + +const log = console.log.bind(console); +console.log = (...args) => { + if (args.length === 1) recordCompletion(args[0]); + return log(...args); +}; + +process.on('exit', (code) => { + process.exitCode = code === 0 ? result : 1; +}); + +require(process.argv[1]); +`; + +function runDrizzleKit( + root: string, + command: 'push' | 'generate' | 'studio', + configPath: string, +): void { + const args = [drizzleKitBin, command, '--config', configPath]; + const { status, error } = spawnSync( + process.execPath, + command === 'studio' + ? args + : ['--input-type=commonjs', '--eval', DRIZZLE_COMPLETION_SCRIPT, '--', ...args], + { cwd: root, stdio: 'inherit' }, + ); + if (error || (status !== 0 && (command === 'studio' || status !== DRIZZLE_UNCHANGED))) { + if (command === 'push') { + console.error( + 'Database schema push did not complete. For prompts, run `void db push` in a terminal. To review changes, use `void db generate` and `void db migrate`.', + ); + } + throw error ?? new Error(`Drizzle Kit ${command} did not complete.`); + } + if (command === 'push' && status === 0) { + printSuccess('Database schema pushed.'); + } } /** * Run a drizzle-kit command against a real database URL. The config holding * the URL lives in a private temp directory outside the project and is - * removed afterwards. Exits with code 1 when drizzle-kit fails; it has - * already printed its own error. + * removed afterwards. */ async function runDrizzleKitWithDatabaseUrl( root: string, @@ -122,7 +179,7 @@ async function runDrizzleKitWithDatabaseUrl( const { withPrivateDrizzleConfig } = await import('../drizzle/config.ts'); const succeeded = withPrivateDrizzleConfig(root, url, dialect, (configPath) => { try { - runDrizzleKit(root, [command, '--config', configPath]); + runDrizzleKit(root, command, configPath); return true; } catch { return false; @@ -401,7 +458,6 @@ async function runPush(root: string, dialect: DatabaseDialect): Promise { if (dialect !== 'sqlite') { const url = getLocalDatabaseUrl(root, dialect); await runDrizzleKitWithDatabaseUrl(root, url, dialect, 'push'); - printSuccess('Database schema pushed.'); return; } @@ -411,11 +467,10 @@ async function runPush(root: string, dialect: DatabaseDialect): Promise { const configPath = writeDrizzleConfig(root, dbPath); try { - runDrizzleKit(root, ['push', '--config', configPath]); + runDrizzleKit(root, 'push', configPath); } catch { process.exit(1); } - printSuccess('Database schema pushed.'); } async function runGenerate(root: string, dialect: DatabaseDialect): Promise { @@ -437,10 +492,10 @@ async function runGenerate(root: string, dialect: DatabaseDialect): Promise { - runDrizzleKit(root, ['generate', '--config', configPath]); + runDrizzleKit(root, 'generate', configPath); }); } else { - runDrizzleKit(root, ['generate', '--config', configPath]); + runDrizzleKit(root, 'generate', configPath); } } catch (error) { log.error(getErrorMessage(error)); @@ -1786,7 +1841,7 @@ async function runStudio(root: string, dialect: DatabaseDialect, remote?: boolea log.info('Opening Drizzle Studio...'); try { - runDrizzleKit(root, ['studio', '--config', configPath]); + runDrizzleKit(root, 'studio', configPath); } catch { process.exit(1); } diff --git a/packages/void/src/drizzle/config.ts b/packages/void/src/drizzle/config.ts index 48e42943d..399e731ac 100644 --- a/packages/void/src/drizzle/config.ts +++ b/packages/void/src/drizzle/config.ts @@ -14,6 +14,12 @@ export const PLACEHOLDER_DB_URL: Record = { mysql: 'mysql://dummy', }; +const PUSH_TABLES_FILTER: Record> = { + sqlite: ['!_void_migrations', '!_migrations'], + postgresql: ['!_void_migrations'], + mysql: ['!_void_migrations', '!_void_migration_lock'], +}; + /** * Write a temporary drizzle-kit config, by default to `.void/drizzle.config.json`. * Schema and migration paths are relative to the project root: drizzle-kit @@ -54,6 +60,7 @@ export function writeDrizzleConfig( ...(casing ? { casing } : {}), schema: schemaPaths.length === 1 ? schemaPaths[0] : schemaPaths, out: `./${relative(root, paths.migrationsDir)}`, + tablesFilter: PUSH_TABLES_FILTER[dialect], migrations: { prefix: 'timestamp' }, dbCredentials: { url: dbPath }, }; diff --git a/packages/void/src/drizzle/generate.ts b/packages/void/src/drizzle/generate.ts index 755bbfbb5..971dd0ddb 100644 --- a/packages/void/src/drizzle/generate.ts +++ b/packages/void/src/drizzle/generate.ts @@ -88,8 +88,10 @@ export async function generateValidatedSqliteMigrations( const existed = existsSync(migrationsDir); const previous = snapshotFiles(migrationsDir); + let generated = false; try { generate(); + generated = true; (await openMigrationValidationDatabase(collectMigrations(migrationsDir))).close(); } catch (cause) { if (!existed) { @@ -105,9 +107,12 @@ export async function generateValidatedSqliteMigrations( writeFileSync(path, contents); } } + const advice = generated + ? ' Review the schema change before retrying. For additive changes, use an additive migration rather than rebuilding existing tables.' + : ''; throw new Error( `${cause instanceof Error ? cause.message : String(cause)}\n` + - 'Migration generation failed; previous SQL, snapshots and journal were restored. Review the schema change before retrying. For additive changes, use an additive migration rather than rebuilding existing tables.', + `Migration generation failed. The previous SQL, snapshots and journal were restored.${advice}`, { cause }, ); } diff --git a/packages/void/test/unit/db-commands.test.ts b/packages/void/test/unit/db-commands.test.ts index ec7bb5195..73ec5459e 100644 --- a/packages/void/test/unit/db-commands.test.ts +++ b/packages/void/test/unit/db-commands.test.ts @@ -13,8 +13,10 @@ import { toSlash } from 'pathslash'; import { afterEach, beforeEach, describe, it, expect, vi } from 'vite-plus/test'; import type { MockInstance } from 'vite-plus/test'; -const mockExecFileSync = vi.hoisted(() => - vi.fn<(...args: Array) => string | Buffer | undefined>(), +const mockSpawnSync = vi.hoisted(() => + vi.fn<(file: string, args: Array, options: unknown) => { status: number }>(() => ({ + status: 0, + })), ); const mockPgQuery = vi.hoisted(() => vi.fn(async (_sql: string) => ({ rows: [] as Array> })), @@ -30,7 +32,7 @@ const mockRunMigrations = vi.fn(); vi.mock('node:child_process', () => ({ - execFileSync: (...args: Parameters) => mockExecFileSync(...args), + spawnSync: (...args: Parameters) => mockSpawnSync(...args), })); vi.mock('pg', async (importOriginal) => { @@ -254,7 +256,7 @@ describe('void db drizzle-kit subprocesses', () => { afterEach(() => { vi.restoreAllMocks(); - mockExecFileSync.mockReset(); + mockSpawnSync.mockReset(); mockGetMiniflareDatabasePath.mockReset(); for (const root of rootsToClean.splice(0, rootsToClean.length)) { rmSync(root, { recursive: true, force: true }); @@ -266,10 +268,10 @@ describe('void db drizzle-kit subprocesses', () => { await runDbCommand(root, { action: 'generate' }); - expect(mockExecFileSync).toHaveBeenCalledTimes(1); - const [command, args, options] = mockExecFileSync.mock.calls[0]; + expect(mockSpawnSync).toHaveBeenCalledTimes(1); + const [command, args, options] = mockSpawnSync.mock.calls[0]; expect(command).toBe(process.execPath); - expect(args).toEqual([ + expect(args.slice(-4)).toEqual([ expect.stringContaining(toSlash(join('drizzle-kit', 'bin.cjs'))), 'generate', '--config', @@ -299,14 +301,18 @@ describe('void db drizzle-kit subprocesses', () => { it('rejects invalid generated SQLite SQL and restores migration artifacts', async () => { const root = createDrizzleProjectRoot(); const migrations = join(root, 'db', 'migrations'); - mockExecFileSync.mockImplementation(() => { + mockSpawnSync.mockImplementationOnce(() => { mkdirSync(join(migrations, 'meta'), { recursive: true }); writeFileSync(join(migrations, '0000.sql'), 'THIS IS NOT SQL;'); writeFileSync(join(migrations, 'meta', '_journal.json'), '{}'); + return { status: 0 }; }); await expect(runDbCommand(root, { action: 'generate' })).rejects.toThrow('process.exit:1'); expect(mockLog.error).toHaveBeenCalledWith(expect.stringContaining('0000.sql')); + expect(mockLog.error).toHaveBeenCalledWith( + expect.stringContaining('Review the schema change before retrying.'), + ); expect(existsSync(migrations)).toBe(false); }); @@ -322,7 +328,7 @@ describe('void db drizzle-kit subprocesses', () => { const config = JSON.parse(readFileSync(join(root, '.void', 'drizzle.config.json'), 'utf8')); expect(config.schema).toBe('./.void/better-auth-schema.ts'); - expect(mockExecFileSync).toHaveBeenCalledOnce(); + expect(mockSpawnSync).toHaveBeenCalledOnce(); }); it('resolves function-based Better Auth schemas with local env values', async () => { diff --git a/packages/void/test/unit/db-drizzle.test.ts b/packages/void/test/unit/db-drizzle.test.ts new file mode 100644 index 000000000..07b04bc1a --- /dev/null +++ b/packages/void/test/unit/db-drizzle.test.ts @@ -0,0 +1,154 @@ +import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { outro } from '@voidzero-dev/vite-plus-prompts'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'; +import { packageFixturePath } from '../../../../test/fixture-dir.ts'; +import { getLocalD1Target, runDbCommand } from '../../src/cli/db.ts'; +import { collectMigrations } from '../../src/migrations/collect.ts'; +import { openSqliteDatabase } from '../../src/migrations/runner.ts'; + +let root: string; + +vi.mock('../../src/cli/yarn-pnp.ts', async (importOriginal) => ({ + ...(await importOriginal()), + get drizzleKitBin() { + return join(root, 'drizzle-kit.cjs'); + }, +})); + +vi.mock('@voidzero-dev/vite-plus-prompts', async (importOriginal) => ({ + ...(await importOriginal()), + outro: vi.fn(), +})); + +function stubDrizzle(stdout: string, stderr = '', status = 0): void { + writeFileSync( + join(root, 'drizzle-kit.cjs'), + `process.stdout.write(${JSON.stringify(stdout)}); +const error = ${JSON.stringify(stderr)}; +if (error) console.error(error); +process.exit(${status});`, + ); +} + +async function useInstalledDrizzleKit(): Promise { + const { drizzleKitBin } = await vi.importActual( + '../../src/cli/yarn-pnp.ts', + ); + writeFileSync( + join(root, 'drizzle-kit.cjs'), + `Object.defineProperty(process.stdin, 'isTTY', { value: false }); +require(${JSON.stringify(drizzleKitBin)});`, + ); +} + +function writeSchema(table: string): void { + writeFileSync( + join(root, 'db/schema.ts'), + `import { integer, sqliteTable } from 'drizzle-orm/sqlite-core'; +export const table = sqliteTable('${table}', { id: integer('id').primaryKey() }); +`, + ); +} + +const drizzleTimeout = process.platform === 'win32' ? 30_000 : 10_000; + +beforeEach(() => { + vi.clearAllMocks(); + root = mkdtempSync(packageFixturePath(import.meta.dirname, 'void-db-drizzle-')); + mkdirSync(join(root, 'db')); + writeSchema('items'); + vi.spyOn(process, 'exit').mockImplementation((code) => { + throw new Error(`process.exit:${code}`); + }); +}); + +afterEach(() => { + vi.restoreAllMocks(); + rmSync(root, { recursive: true, force: true }); +}); + +describe('void db push', () => { + const successMessage = expect.stringContaining('Database schema pushed.'); + + it.each([ + ['a declined prompt', '[\u001b[31mx\u001b[0m] All changes were aborted\n', ''], + ['a missing terminal', '', 'Error: Interactive prompts require a TTY terminal\n'], + ])('fails on %s even when Drizzle Kit exits 0', async (_reason, stdout, stderr) => { + stubDrizzle(stdout, stderr); + const error = vi.spyOn(console, 'error').mockImplementation(() => {}); + + await expect(runDbCommand(root, { action: 'push' })).rejects.toThrow('process.exit:1'); + expect(error).toHaveBeenCalledExactlyOnceWith( + 'Database schema push did not complete. For prompts, run `void db push` in a terminal. To review changes, use `void db generate` and `void db migrate`.', + ); + expect(outro).not.toHaveBeenCalledWith(successMessage, expect.anything()); + }); + + it('exits successfully when the database is already up to date', async () => { + stubDrizzle('\n[\u001b[34mi\u001b[0m] No changes detected\n'); + + await runDbCommand(root, { action: 'push' }); + expect(outro).not.toHaveBeenCalledWith(successMessage, expect.anything()); + }); + + it('fails when Drizzle Kit exits nonzero after printing a completion message', async () => { + stubDrizzle('[i] No changes detected\n', '', 2); + + await expect(runDbCommand(root, { action: 'push' })).rejects.toThrow('process.exit:1'); + expect(outro).not.toHaveBeenCalledWith(successMessage, expect.anything()); + }); + + it.each(['_void_migrations', '_migrations'])( + 'preserves rows in the %s journal when adding a table', + { timeout: drizzleTimeout }, + async (journal) => { + await useInstalledDrizzleKit(); + const { databasePath } = getLocalD1Target(root); + mkdirSync(dirname(databasePath), { recursive: true }); + const db = await openSqliteDatabase(databasePath); + try { + db.exec(` + CREATE TABLE ${journal} (name TEXT PRIMARY KEY, applied_at TEXT NOT NULL); + INSERT INTO ${journal} VALUES ('0000_init.sql', '2026-01-01'); + `); + await runDbCommand(root, { action: 'push' }); + expect(outro).toHaveBeenCalledWith(successMessage, expect.anything()); + expect(db.prepare(`SELECT * FROM ${journal}`).all()).toEqual([ + { name: '0000_init.sql', applied_at: '2026-01-01' }, + ]); + expect(db.prepare('SELECT * FROM items').all()).toEqual([]); + } finally { + db.close(); + } + }, + ); +}); + +describe('void db generate', () => { + it( + 'generates SQL, succeeds on an unchanged schema, and fails when a rename needs a TTY', + { + timeout: drizzleTimeout, + }, + async () => { + await useInstalledDrizzleKit(); + const migrations = join(root, 'db/migrations'); + const successMessage = expect.stringContaining('Migration generation complete.'); + + await runDbCommand(root, { action: 'generate' }); + const files = collectMigrations(migrations); + expect(files).toHaveLength(1); + expect(outro).toHaveBeenCalledWith(successMessage, expect.anything()); + + await runDbCommand(root, { action: 'generate' }); + expect(collectMigrations(migrations)).toEqual(files); + + vi.mocked(outro).mockClear(); + writeSchema('inventory'); + await expect(runDbCommand(root, { action: 'generate' })).rejects.toThrow('process.exit:1'); + expect(outro).not.toHaveBeenCalledWith(successMessage, expect.anything()); + expect(collectMigrations(migrations)).toEqual(files); + }, + ); +}); diff --git a/packages/void/test/unit/db-studio-remote.test.ts b/packages/void/test/unit/db-studio-remote.test.ts index 4011b464b..fb81c1a59 100644 --- a/packages/void/test/unit/db-studio-remote.test.ts +++ b/packages/void/test/unit/db-studio-remote.test.ts @@ -55,12 +55,12 @@ vi.mock('../../src/drizzle/config.ts', () => ({ mockWithPrivateDrizzleConfig(...(args as Parameters)), })); -// Mock execFileSync (used by runDrizzleKit) so no child process is spawned. -const mockExecFileSync = vi.fn<() => void>(() => undefined); +const mockSpawnSync = vi.fn<(file: string, args: Array) => { status: number }>(() => ({ + status: 0, +})); vi.mock('node:child_process', () => ({ - execFileSync: (...args: Array) => - mockExecFileSync(...(args as Parameters)), + spawnSync: (...args: Parameters) => mockSpawnSync(...args), })); vi.mock('@voidzero-dev/vite-plus-prompts', () => ({ @@ -80,9 +80,9 @@ vi.mock('@voidzero-dev/vite-plus-prompts', () => ({ const roots: Array = []; function expectDrizzleKitRunWithPrivateConfig(command: 'push' | 'studio'): void { - expect(mockExecFileSync).toHaveBeenCalledTimes(1); - const cliArgs = (mockExecFileSync.mock.calls[0] as unknown as [string, Array])[1]; - expect(cliArgs.slice(1)).toEqual([command, '--config', PRIVATE_CONFIG_PATH]); + expect(mockSpawnSync).toHaveBeenCalledTimes(1); + const cliArgs = mockSpawnSync.mock.calls[0][1]; + expect(cliArgs.slice(-3)).toEqual([command, '--config', PRIVATE_CONFIG_PATH]); } function createProjectRoot(options: { database?: 'pg' } = {}): string { @@ -139,9 +139,7 @@ describe('void db studio --remote (PostgreSQL)', () => { it('exits with code 1 when drizzle-kit studio fails', async () => { const root = createProjectRoot({ database: 'pg' }); mockGetDatabaseUrl.mockResolvedValue({ url: 'postgres://user:pass@host:5432/mydb' }); - mockExecFileSync.mockImplementationOnce(() => { - throw new Error('Command failed'); - }); + mockSpawnSync.mockReturnValueOnce({ status: 2 }); await expect(runDbCommand(root, { action: 'studio', remote: true })).rejects.toThrow( 'process.exit:1', @@ -157,7 +155,7 @@ describe('void db studio --remote (PostgreSQL)', () => { 'process.exit:1', ); expect(mockGetDatabaseUrl).not.toHaveBeenCalled(); - expect(mockExecFileSync).not.toHaveBeenCalled(); + expect(mockSpawnSync).not.toHaveBeenCalled(); }); it('errors when no project is linked', async () => { @@ -168,7 +166,7 @@ describe('void db studio --remote (PostgreSQL)', () => { 'process.exit:1', ); expect(mockGetDatabaseUrl).not.toHaveBeenCalled(); - expect(mockExecFileSync).not.toHaveBeenCalled(); + expect(mockSpawnSync).not.toHaveBeenCalled(); }); }); @@ -195,7 +193,7 @@ describe('void db studio --remote (D1)', () => { } }); - it('errors with a PostgreSQL/MySQL-only message for D1 and does not call writeDrizzleConfig or execFileSync', async () => { + it('rejects remote D1 Studio before writing a config or running Drizzle Kit', async () => { const root = createProjectRoot(); const { log: clackLog } = await import('@voidzero-dev/vite-plus-prompts'); @@ -212,7 +210,7 @@ describe('void db studio --remote (D1)', () => { expect(mockWriteDrizzleConfig).not.toHaveBeenCalled(); expect(mockWithPrivateDrizzleConfig).not.toHaveBeenCalled(); - expect(mockExecFileSync).not.toHaveBeenCalled(); + expect(mockSpawnSync).not.toHaveBeenCalled(); expect(mockGetDatabaseUrl).not.toHaveBeenCalled(); }); }); @@ -248,7 +246,7 @@ describe('void db studio and push (local)', () => { 'No local database found. Start the dev server first.', ); expect(mockGetDatabaseUrl).not.toHaveBeenCalled(); - expect(mockExecFileSync).not.toHaveBeenCalled(); + expect(mockSpawnSync).not.toHaveBeenCalled(); }); it('local PG studio errors when .env has no DATABASE_URL', async () => { @@ -259,7 +257,7 @@ describe('void db studio and push (local)', () => { ); expect(mockGetDatabaseUrl).not.toHaveBeenCalled(); - expect(mockExecFileSync).not.toHaveBeenCalled(); + expect(mockSpawnSync).not.toHaveBeenCalled(); }); it('local PG studio passes the .env database URL through a private config', async () => { diff --git a/packages/void/test/unit/drizzle-config.test.ts b/packages/void/test/unit/drizzle-config.test.ts index 98241bbca..142fbf785 100644 --- a/packages/void/test/unit/drizzle-config.test.ts +++ b/packages/void/test/unit/drizzle-config.test.ts @@ -41,6 +41,7 @@ describe('writeDrizzleConfig', () => { expect(config.schema).toBe('./db/schema.ts'); expect(config.out).toBe('./db/migrations'); expect(config.dbCredentials.url).toBe('/tmp/test.sqlite'); + expect(config.tablesFilter).toEqual(['!_void_migrations', '!_migrations']); expect(config.migrations).toEqual({ prefix: 'timestamp' }); expect(config).not.toHaveProperty('casing'); }); @@ -58,6 +59,7 @@ describe('writeDrizzleConfig', () => { expect(config.schema).toBe('./db/schema.ts'); expect(config.out).toBe('./db/migrations'); expect(config.dbCredentials.url).toBe('postgresql://localhost/test'); + expect(config.tablesFilter).toEqual(['!_void_migrations']); }); it('generates MySQL config', () => { @@ -66,6 +68,7 @@ describe('writeDrizzleConfig', () => { expect(config.dialect).toBe('mysql'); expect(config.schema).toBe('./db/schema.ts'); expect(config.dbCredentials.url).toBe('mysql://localhost/test'); + expect(config.tablesFilter).toEqual(['!_void_migrations', '!_void_migration_lock']); }); it('includes generated schemas alongside the application schema', () => {