You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After switching to Atlas for migrations, the first migration added an additional unique index on all id fields, even though there is already a primary key index.
The issue is present in the latest release.
I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
Switching to Atlas creates migrations such as:
CREATEUNIQUE INDEX "users_id_key" ON"users" ("id");
When users already has a primary key index:
Indexes:
"users_pkey"PRIMARY KEY, btree (id)
Resulting in:
Table "public.users"
Column | Type | Collation | Nullable | Default
--------------------+-----------------------------+-----------+----------+----------------------------
id | character varying | | not null |
Indexes:
"users_pkey"PRIMARY KEY, btree (id)
"users_id_key" UNIQUE, btree (id)
Expected Behavior 🤔
Atlas should recognise the primary key index and not create an additional index.
After switching to Atlas for migrations, the first migration added an additional unique index on all
id
fields, even though there is already a primary key index.Current Behavior 😯
Switching to Atlas creates migrations such as:
When
users
already has a primary key index:Resulting in:
Expected Behavior 🤔
Atlas should recognise the primary key index and not create an additional index.
Steps to Reproduce 🕹
Usual Ent setup using custom IDs as strings.
Your Environment 🌎
1.18.rc1
master
master
The text was updated successfully, but these errors were encountered: