Missing index after using tool #171
Unanswered
TantumNTatari
asked this question in
Q&A
Replies: 1 comment 11 replies
-
Could you post the generated code? Which version did you use? |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
After using this tool to reflect a table in my database, the declarative model that was produced was missing an index. I was just wondering if anyone might know why this is the case:
The actual database, using the '\d+ users' command
Table "public.users"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
-------------------+--------------------------+-----------+----------+-----------------------------------+----------+--------------+-------------
id | integer | | not null | nextval('users_id_seq'::regclass) | plain | |
email | text | | not null | | extended | |
password | bytea | | not null | | extended | |
Indexes:
"users_pkey" PRIMARY KEY, btree (id)
"users_email_unique_idx" UNIQUE, btree (lower(email))
"users_username_password_idx" btree (email, password)
However, the tool would only show the following:
Table "public.users"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
-------------------+--------------------------+-----------+----------+-----------------------------------+----------+--------------+-------------
id | integer | | not null | nextval('users_id_seq'::regclass) | plain | |
email | text | | not null | | extended | |
password | bytea | | not null | | extended | |
Indexes:
"users_pkey" PRIMARY KEY, btree (id)
"users_username_password_idx" btree (email, password)
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions