drizzle-kit pull drops single-column PK and FK names from schema.ts
@sungodtemple▲ 0 net votes
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.