diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 12:06:13 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 12:06:13 +0000 |
commit | 0a850868dfb85086cba8320cee9dac4657dcae6c (patch) | |
tree | 40d17228fe23d9db7b861fe2a20d024d64c50323 /db/migrate | |
parent | 3744bcc0d10d24104e39985b6833a0ec51791c0a (diff) | |
download | gitlab-ce-0a850868dfb85086cba8320cee9dac4657dcae6c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20190930025655_add_incident_management_throttle_columns_to_application_setting.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/db/migrate/20190930025655_add_incident_management_throttle_columns_to_application_setting.rb b/db/migrate/20190930025655_add_incident_management_throttle_columns_to_application_setting.rb new file mode 100644 index 00000000000..577c705fbef --- /dev/null +++ b/db/migrate/20190930025655_add_incident_management_throttle_columns_to_application_setting.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +class AddIncidentManagementThrottleColumnsToApplicationSetting < ActiveRecord::Migration[5.2] + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def up + add_column(:application_settings, + :throttle_incident_management_notification_enabled, + :boolean, + null: false, + default: false) + + add_column(:application_settings, + :throttle_incident_management_notification_period_in_seconds, + :integer, + default: 3_600) + + add_column(:application_settings, + :throttle_incident_management_notification_per_period, + :integer, + default: 3_600) + end + + def down + remove_column :application_settings, :throttle_incident_management_notification_enabled + remove_column :application_settings, :throttle_incident_management_notification_period_in_seconds + remove_column :application_settings, :throttle_incident_management_notification_per_period + end +end |