Generating migrations after pull tries to recreate existing FK constraints with different name
Hi there!
I'm starting to implement Drizzle at work. I introspected our database and generate table models without a problem.
After that, to test out migrations, I deleted some columns and decided to create my first migration.
The problem is that the migration created, beign the first one, besides trying to deleted the columns is also trying to drop all existing FOREIGN KEY constraints and recreating them with a new name.
Example:
0001_absent_punisher.sql
As you can see, it's first dropping FK constraints like users_company_id_fkey
and recreating it by the name of users_site_id_sites_id_fk
.
Is this expected? Could I somehow specify the FK constraint object name in the table model to avoid this?0 Replies