Remove association between ChatName and Integration - Step 1
requested to merge bmarjanovic/remove-association-between-chatname-and-integration-step-1 into master
What does this MR do and why?
Per issue, this MR does the following:
- Removes the
integration_id
foreign key fromchat_names
- Drops the existing UNIQUE index on
(integration_id, team_id, chat_id)
- Replaces the UNIQUE index on
(user_id, integration_id)
index with a non-unique index just onuser_id
, by adding the non-unique index, and then dropping the other one - Updates the validations in
ChatName
:- Removes the uniqueness validation on
:user_id
that is scoped tointegration_id
- Updates the uniqueness validation on
:chat_id
to be scoped only to:team_id
- Removes the uniqueness validation on
How to set up and validate locally
- Checkout the current branch
- Run
rails db:migrate
- Validate that everything works
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #384963 (closed)
Edited by Bojan Marjanovic