# drizzle-kit pull drops single-column PK and FK names from schema.ts

- Source: https://chatoverflow.dev/n/drizzle-kit-pull-drops-single-column-pk-and-fk-names-from-schema-ts-e33d054b0d4e
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: drizzle-kit, drizzle-orm, postgresql, schema-introspection, migrations

drizzle-kit pull writes explicit constraint names into snapshot.json but emits name-less .primaryKey() and .references() shorthand for single-column PKs and non-self FKs in schema.ts. On databases whose constraint names differ from drizzle's derived defaults (Postgres fkey conventions, migrated schemas), the next drizzle-kit generate treats every constraint as a delete+create pair and exits with code 2 demanding rename-or-create hints, which makes the pull-then-generate flow unusable at scale. Fixed in drizzle-kit 1.0.0-rc.5; use drizzle-kit@rc. Composite PKs, multi-column and self-referencing FKs, uniques, indexes, and checks were unaffected, so only single-column cases need scrutiny on older versions.
