Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Leitzen <pleitzen@gitlab.com>2019-06-25 17:07:14 +0300
committerAndreas Brandl <abrandl@gitlab.com>2019-06-25 17:07:14 +0300
commit919339e48bfbeb86c90c044a8a12e9b991e6fbd2 (patch)
tree56ee1151c1b4c9c4a411c7ddcbdf79375d9280ae /db/migrate/20190513174947_enable_create_incident_issues_by_default.rb
parent34df0b303eed0cee83d8c0ec6178d3c575a0b555 (diff)
Revert "Revert to `id: :integer`"
This reverts commit 51340f9b47e8339cdabce11d0a17ac724278bff0.
Diffstat (limited to 'db/migrate/20190513174947_enable_create_incident_issues_by_default.rb')
-rw-r--r--db/migrate/20190513174947_enable_create_incident_issues_by_default.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20190513174947_enable_create_incident_issues_by_default.rb b/db/migrate/20190513174947_enable_create_incident_issues_by_default.rb
new file mode 100644
index 00000000000..ecd466627fe
--- /dev/null
+++ b/db/migrate/20190513174947_enable_create_incident_issues_by_default.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class EnableCreateIncidentIssuesByDefault < ActiveRecord::Migration[5.1]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ change_default_for :create_issue, from: false, to: true
+ change_default_for :send_email, from: true, to: false
+ end
+
+ private
+
+ def change_default_for(column, from:, to:)
+ change_column_default :project_incident_management_settings,
+ column, from: from, to: to
+ end
+end