diff --git a/changelogs/unreleased/add-auto_close_incident-column-to-incident_management_settings.yml b/changelogs/unreleased/add-auto_close_incident-column-to-incident_management_settings.yml new file mode 100644 index 0000000000000000000000000000000000000000..63a049cd8f5539def2203613ddc5459518ccc6a2 --- /dev/null +++ b/changelogs/unreleased/add-auto_close_incident-column-to-incident_management_settings.yml @@ -0,0 +1,5 @@ +--- +title: Adds auto_close_incident column to project_incident_management_settings +merge_request: 39980 +author: +type: added diff --git a/db/migrate/20200820130839_add_auto_close_incident_to_project_incident_management_settings.rb b/db/migrate/20200820130839_add_auto_close_incident_to_project_incident_management_settings.rb new file mode 100644 index 0000000000000000000000000000000000000000..01aafa6d988d66983cce93aef61540f48dffeda3 --- /dev/null +++ b/db/migrate/20200820130839_add_auto_close_incident_to_project_incident_management_settings.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddAutoCloseIncidentToProjectIncidentManagementSettings < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def up + add_column :project_incident_management_settings, :auto_close_incident, :boolean, default: true, null: false + end + + def down + remove_column :project_incident_management_settings, :auto_close_incident + end +end diff --git a/db/schema_migrations/20200820130839 b/db/schema_migrations/20200820130839 new file mode 100644 index 0000000000000000000000000000000000000000..e372e4df2bebebfbf4668bc9b410cccf1cdaeb98 --- /dev/null +++ b/db/schema_migrations/20200820130839 @@ -0,0 +1 @@ +751a2c8e06b522b1564ea09f961d8883543a631874ae26bb14c98b7b442d59cc \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 7fdde701fbf246064d128fc8304d7718a3ae6d0f..7e848777840acce245199b8d5c7e809050905dba 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -14403,6 +14403,7 @@ CREATE TABLE public.project_incident_management_settings ( pagerduty_active boolean DEFAULT false NOT NULL, encrypted_pagerduty_token bytea, encrypted_pagerduty_token_iv bytea, + auto_close_incident boolean DEFAULT true NOT NULL, CONSTRAINT pagerduty_token_iv_length_constraint CHECK ((octet_length(encrypted_pagerduty_token_iv) <= 12)), CONSTRAINT pagerduty_token_length_constraint CHECK ((octet_length(encrypted_pagerduty_token) <= 255)) );