summaryrefslogtreecommitdiff
path: root/db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb')
-rw-r--r--db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb b/db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb
new file mode 100644
index 00000000000..7301bcf2c6c
--- /dev/null
+++ b/db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb
@@ -0,0 +1,17 @@
+class CleanupMergeRequestsAllowMaintainerToPushRename < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ # NOOP
+ end
+
+ def down
+ if column_exists?(:merge_requests, :allow_collaboration)
+ rename_column_concurrently :merge_requests, :allow_collaboration, :allow_maintainer_to_push
+ end
+ end
+end