Skip to content

Add status page url field to DB and setting model

Sarah Yasonik requested to merge sy-add-status-page-url-field into master

What does this MR do?

In order to automatically link to status page detail views, we need to ask the user to provide the url of their status page frontend.

This MR adds support for a new StatusPageSetting field to the DB & model. Future MRs will allow CRUD actions via the internal API, add the FE, and then make the field fully required after all other MRs have merged.

Related MRs:

Migration Output:

$ rake db:migrate:down VERSION=20200408212219
== 20200408212219 AddStatusPageUrlToStatusPageSettings: reverting =============
-- remove_column(:status_page_settings, :status_page_url)
   -> 0.0013s
== 20200408212219 AddStatusPageUrlToStatusPageSettings: reverted (0.0014s) ====

$ rake db:migrate
== 20200408212219 AddStatusPageUrlToStatusPageSettings: migrating =============
-- add_column(:status_page_settings, :status_page_url, :text)
   -> 0.0011s
-- transaction_open?()
   -> 0.0000s
-- execute("ALTER TABLE status_page_settings\nADD CONSTRAINT check_75a79cd992\nCHECK ( char_length(status_page_url) <= 1024 )\nNOT VALID;\n")
   -> 0.0010s
-- execute("SET statement_timeout TO 0")
   -> 0.0002s
-- execute("ALTER TABLE status_page_settings VALIDATE CONSTRAINT check_75a79cd992;")
   -> 0.0006s
-- execute("RESET ALL")
   -> 0.0002s
== 20200408212219 AddStatusPageUrlToStatusPageSettings: migrated (0.0145s) ====

Related Issue: #213913 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Mayra Cabrera

Merge request reports