Remove association between ChatName and Integration - Step 2
requested to merge bmarjanovic/remove-association-between-chatname-and-integration-step-2 into master
What does this MR do and why?
Per issue, the MR introduces:
- updates the
ChatNames::AuthorizeUserService
to not take an integration (the#chat_name_params
in that class will have nointegration_id
) - updates the
Gitlab::ChatNameToken#get
to not retrieveintegration_id
- removes CONSTRAINT CHECK (introduced an irreversible migration)
- removes presence validation
In addition, it solves the #370308 (closed)
Database Migration
- Output of
db:migrate
$ scripts/db_tasks db:migrate
main: == 20221228083452 RemoveCheckConstraintOnChatNamesOnIntegration: migrating ====
main: -- transaction_open?()
main: -> 0.0000s
main: -- transaction_open?()
main: -> 0.0000s
main: -- execute(" ALTER TABLE chat_names\n DROP CONSTRAINT IF EXISTS check_2b0a0d0f0f\n")
main: -> 0.0015s
main: == 20221228083452 RemoveCheckConstraintOnChatNamesOnIntegration: migrated (0.0150s)
- Output of
db:rollback
$ scripts/db_tasks db:migrate:down VERSION=20221228083452
main: == 20221228083452 RemoveCheckConstraintOnChatNamesOnIntegration: reverting ====
main: -- transaction_open?()
main: -> 0.0000s
main: -- current_schema()
main: -> 0.0007s
main: -- transaction_open?()
main: -> 0.0000s
main: -- execute("ALTER TABLE chat_names\nADD CONSTRAINT check_2b0a0d0f0f\nCHECK ( integration_id IS NOT NULL )\nNOT VALID;\n")
main: -> 0.0011s
main: -- current_schema()
main: -> 0.0004s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0004s
main: -- execute("ALTER TABLE chat_names VALIDATE CONSTRAINT check_2b0a0d0f0f;")
main: -> 0.0007s
main: -- execute("RESET statement_timeout")
main: -> 0.0004s
main: == 20221228083452 RemoveCheckConstraintOnChatNamesOnIntegration: reverted (0.0258s)
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 #384973 (closed)
Edited by Bojan Marjanovic