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
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-07 00:07:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-07 00:07:43 +0300
commit015663b70f1bcdae4483e38c2beac884f92da5b8 (patch)
tree6dd5a59c7f9a27c3cca22801ca30bf3dd8f9b401 /db
parent5eb11b697d7ee280b0b5c2ff9a1850a3b5e9b7e3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20191213184609_backfill_operations_feature_flags_active.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20191213184609_backfill_operations_feature_flags_active.rb b/db/migrate/20191213184609_backfill_operations_feature_flags_active.rb
new file mode 100644
index 00000000000..cc61b30acae
--- /dev/null
+++ b/db/migrate/20191213184609_backfill_operations_feature_flags_active.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class BackfillOperationsFeatureFlagsActive < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ class OperationsFeatureFlag < ActiveRecord::Base
+ self.table_name = 'operations_feature_flags'
+ self.inheritance_column = :_type_disabled
+ end
+
+ def up
+ OperationsFeatureFlag.where(active: false).update_all(active: true)
+ end
+
+ def down
+ # no-op
+ end
+end