Database work to support inherited templates on service desk
What does this MR do?
Adds file_template_project_id
column to service_desk_settings
. This is part of the work to
support using inherited templates on service desk issues.
Part of #299084 (closed)
Migration output
== 20210818193008 AddFileTemplateProjectToServiceDeskSettings: migrating ======
-- add_column(:service_desk_settings, :file_template_project_id, :bigint, {:null=>true})
-> 0.0018s
== 20210818193008 AddFileTemplateProjectToServiceDeskSettings: migrated (0.0226s)
== 20210818200455 AddFileTemplateProjectForeignKeyToServiceDeskSettings: migrating
-- transaction_open?()
-> 0.0000s
-- foreign_keys(:service_desk_settings)
-> 0.0027s
-- execute("ALTER TABLE service_desk_settings\nADD CONSTRAINT fk_03afb71f06\nFOREIGN KEY (file_template_project_id)\nREFERENCES projects (id)\nON DELETE SET NULL\nNOT VALID;\n")
-> 0.0083s
-- execute("SET statement_timeout TO 0")
-> 0.0004s
-- execute("ALTER TABLE service_desk_settings VALIDATE CONSTRAINT fk_03afb71f06;")
-> 0.0218s
-- execute("RESET statement_timeout")
-> 0.0012s
== 20210818200455 AddFileTemplateProjectForeignKeyToServiceDeskSettings: migrated (0.0421s)
Edited by Felipe Cardozo