Skip to content

feat(drizzle-kit): support non-interactive generate conflicts#5454

Open
enki wants to merge 2 commits intodrizzle-team:mainfrom
enki:feat/generate-preflight-answers
Open

feat(drizzle-kit): support non-interactive generate conflicts#5454
enki wants to merge 2 commits intodrizzle-team:mainfrom
enki:feat/generate-preflight-answers

Conversation

@enki
Copy link

@enki enki commented Mar 7, 2026

Refs #5307

Summary

  • add a shared migration-question model plus non-interactive conflict resolvers for generate
  • support drizzle-kit generate --preflight and --answers <json|path> without creating the migration folder during preflight
  • make generate --preflight machine-readable by keeping the JSON payload on stdout and routing incidental info logs to stderr
  • expose matching API support via generate*Migration(..., { answers }) and preflight*Migration() helpers

Testing

  • pnpm -C drizzle-orm build
  • pnpm -C drizzle-kit exec tsc -p tsconfig.build.json --noEmit
  • pnpm -C drizzle-kit exec vitest run tests/api-generate.test.ts tests/generate-questions.test.ts
  • pnpm -C drizzle-kit exec vitest run tests/cli-generate.test.ts tests/cli-preflight-output.test.ts
  • pnpm -C drizzle-kit exec vitest run tests/pg-tables.test.ts tests/pg-columns.test.ts tests/rls/pg-policy.test.ts

@enki
Copy link
Author

enki commented Mar 9, 2026

Follow-up commit pushed: preflight generate is now machine-readable on stdout, with config/schema info logs routed to stderr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant