-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIM-1847: Create User Settings View - Database #164
PIM-1847: Create User Settings View - Database #164
Conversation
|
||
ALTER TABLE cuws.user_setting ADD CONSTRAINT fk_us_of | ||
FOREIGN KEY (office_id) | ||
REFERENCES cuws.office(office_id) ON DELETE RESTRICT ON UPDATE RESTRICT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ON DELETE RESTRICT ON UPDATE RESTRICT is not necessary. There are some triggers set in ER/Studio
; | ||
|
||
CREATE INDEX ix_us_lug ON cuws.user_setting(login_user_guid) | ||
TABLESPACE pg_default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indexes for foreign keys insurance plan and office are missing
CREATE INDEX ix_us_lug ON cuws.user_setting(login_user_guid) | ||
TABLESPACE pg_default | ||
; | ||
CREATE INDEX ix_us_psip ON cuws.user_setting(policy_search_insurance_plan_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually call the foreign key index the same as the foreign key besides the prefix (fk_ vs ix_)
So for these two it would be ix_us_ip and ix_us_of
No description provided.