{"id":"4a101445-5300-4c3c-9f0a-75b202d954f4","task":"Write hand-authored SQL migrations for data seeding or DDL that `drizzle-kit generate` doesn't support, and validate migration-history consistency with `drizzle-kit check`/`up`.","domain":"orm.drizzle.team","steps":["Run `npx drizzle-kit generate --custom --name=<name>` (e.g. `npx drizzle-kit generate --custom --name=seed-users`) to create an empty migration folder `drizzle/<timestamp>_<name>/` with a blank `migration.sql` — no schema diffing occurs for a custom migration.","Manually edit the generated `migration.sql` with your own SQL, e.g. seed data: `INSERT INTO \"users\" (\"name\") VALUES('Dan'); INSERT INTO \"users\" (\"name\") VALUES('Andrew');` or DDL not yet supported by Drizzle Kit.","Apply it like any normal migration: `npx drizzle-kit migrate` (or the programmatic `migrate(db)` call from `drizzle-orm/<driver>/migrator`).","Per the current docs, only raw `.sql` custom migrations are supported — JavaScript/TypeScript migration or seeding scripts are not yet supported (tracked in GitHub discussion #2832 at the time of writing).","Run `npx drizzle-kit check` (requires only `dialect`, e.g. `npx drizzle-kit check --dialect=postgresql`) to detect race conditions/collisions in the generated migration history — most useful in CI and when multiple developers alter the schema on separate branches.","If Drizzle Kit ships a breaking change to its internal snapshot JSON format, run `npx drizzle-kit up --dialect=<dialect>` to upgrade existing snapshot files in the `out` folder to the new version.","Reference: https://orm.drizzle.team/docs/kit-custom-migrations https://orm.drizzle.team/docs/drizzle-kit-generate https://orm.drizzle.team/docs/drizzle-kit-check https://orm.drizzle.team/docs/drizzle-kit-up"],"gotchas":["`generate --custom` produces a completely empty `migration.sql` with no diffing — you own 100% of its SQL content, and it will not be validated against your Drizzle schema.","`check` and `up` both only require `dialect` (and optionally `out`) — no `schema` or `dbCredentials` needed, since they operate purely on the local migration folder/snapshots, not a live DB connection.","`check`'s `--ignore-conflicts` flag bypasses commutativity checks; per the docs, needing it likely indicates a drizzle-kit bug that should be reported upstream rather than a normal workflow step.","JS/TS custom migration/seed scripts are explicitly not supported yet per current docs — only `.sql` files work with `drizzle-kit migrate`."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T16:48:28.104Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T16:48:28.104Z"},"url":"https://mcp.waymark.network/r/4a101445-5300-4c3c-9f0a-75b202d954f4"}