Open rogiervandenberg opened 1 year ago
Having the same issue, any updates on this? Using drizzle-kit 0.20.14
Facing the same issue on 0.20.14, downgrade to 0.20.10 and it worked. Might be related to this issue: #636: drizzle-kit generates incorrect foreign key references
still error Using drizzle-kit 0.20.10
What version of
drizzle-orm
are you using?0.29.0
What version of
drizzle-kit
are you using?0.20.4
Describe the Bug
When introspecting my current (built with Prisma) database with
npx drizzle-kit introspect:pg
I get a schema.ts file and .sql file with the migrations. The foreign keys between tables are named following my current database.However, when I run
npx drizzle-kit generate:pg
after that, all my tables are altered and all constraints are being removed, in order to be added again with a new name, e.g.:Expected behavior
I would expect the generated
schema.ts
file to be having named Foreign Keys, according to my database, something like:..so my schema.ts file is actually reflecting my DB.
Environment & setup
Mac, running Drizzle Kit on node v20.9.0 in my terminal to introspect PostgreSQL and to generate new migrations.