Skip to content

Remove association between ChatName and Integration - Step 1

What does this MR do and why?

Per issue, this MR does the following:

  • Removes the integration_id foreign key from chat_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 on user_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 to integration_id
    • Updates the uniqueness validation on :chat_id to be scoped only to :team_id

How to set up and validate locally

  1. Checkout the current branch
  2. Run rails db:migrate
  3. 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.

Related to #384963 (closed)

Edited by Bojan Marjanovic

Merge request reports

Loading