summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-09-18 19:20:43 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-09-18 19:20:43 +0000
commitd236a6c2b2e22199367c6e17c470523b587374ab (patch)
tree30c38895821994be8a24f0edbc0d555a8519b5d1 /db
parent354f0bccbf8d530fbb5a1eb2b3cea931c644cc59 (diff)
downloadgitlab-ce-d236a6c2b2e22199367c6e17c470523b587374ab.tar.gz
Resolve "Enable Auto DevOps by default for self managed instances of GitLab"
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180813101999_change_default_of_auto_devops_instance_wide.rb15
-rw-r--r--db/migrate/20180813102000_enable_auto_devops_instance_wide_for_everyone.rb15
-rw-r--r--db/schema.rb2
3 files changed, 31 insertions, 1 deletions
diff --git a/db/migrate/20180813101999_change_default_of_auto_devops_instance_wide.rb b/db/migrate/20180813101999_change_default_of_auto_devops_instance_wide.rb
new file mode 100644
index 00000000000..05d1124f5c4
--- /dev/null
+++ b/db/migrate/20180813101999_change_default_of_auto_devops_instance_wide.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class ChangeDefaultOfAutoDevopsInstanceWide < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ change_column_default :application_settings, :auto_devops_enabled, true
+ end
+
+ def down
+ change_column_default :application_settings, :auto_devops_enabled, false
+ end
+end
diff --git a/db/migrate/20180813102000_enable_auto_devops_instance_wide_for_everyone.rb b/db/migrate/20180813102000_enable_auto_devops_instance_wide_for_everyone.rb
new file mode 100644
index 00000000000..21fb62806b3
--- /dev/null
+++ b/db/migrate/20180813102000_enable_auto_devops_instance_wide_for_everyone.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class EnableAutoDevopsInstanceWideForEveryone < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ execute "UPDATE application_settings SET auto_devops_enabled = true"
+ end
+
+ def down
+ # No way to know here what their previous setting was...
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 95df735cd37..b299cde4898 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -141,7 +141,7 @@ ActiveRecord::Schema.define(version: 20180907015926) do
t.integer "performance_bar_allowed_group_id"
t.boolean "hashed_storage_enabled", default: false, null: false
t.boolean "project_export_enabled", default: true, null: false
- t.boolean "auto_devops_enabled", default: false, null: false
+ t.boolean "auto_devops_enabled", default: true, null: false
t.integer "circuitbreaker_failure_count_threshold", default: 3
t.integer "circuitbreaker_failure_reset_time", default: 1800
t.integer "circuitbreaker_storage_timeout", default: 15