summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-05-23 09:54:57 +0800
committerMark Chao <mchao@gitlab.com>2018-06-01 14:33:12 +0900
commit0d44f4d50ef175997fe1f90de9e622a4f3b867e3 (patch)
tree1a494b42fdc26c700c87f5ce65e5553ed7ab78db /db
parent76c23de3b63503a08a715afb6414596a7a4879d2 (diff)
downloadgitlab-ce-0d44f4d50ef175997fe1f90de9e622a4f3b867e3.tar.gz
Rephrase "maintainer" to more precise "members who can merge to the target branch"42751-rename-mr-maintainer-push
"Maintainer" will be freed to be used for #42751
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180523042841_rename_merge_requests_allow_maintainer_to_push.rb15
-rw-r--r--db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb15
-rw-r--r--db/schema.rb2
3 files changed, 31 insertions, 1 deletions
diff --git a/db/migrate/20180523042841_rename_merge_requests_allow_maintainer_to_push.rb b/db/migrate/20180523042841_rename_merge_requests_allow_maintainer_to_push.rb
new file mode 100644
index 00000000000..975bdfe70f4
--- /dev/null
+++ b/db/migrate/20180523042841_rename_merge_requests_allow_maintainer_to_push.rb
@@ -0,0 +1,15 @@
+class RenameMergeRequestsAllowMaintainerToPush < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ rename_column_concurrently :merge_requests, :allow_maintainer_to_push, :allow_collaboration
+ end
+
+ def down
+ cleanup_concurrent_column_rename :merge_requests, :allow_collaboration, :allow_maintainer_to_push
+ end
+end
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..b9ce4600675
--- /dev/null
+++ b/db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb
@@ -0,0 +1,15 @@
+class CleanupMergeRequestsAllowMaintainerToPushRename < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ cleanup_concurrent_column_rename :merge_requests, :allow_maintainer_to_push, :allow_collaboration
+ end
+
+ def down
+ rename_column_concurrently :merge_requests, :allow_collaboration, :allow_maintainer_to_push
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f8663574580..a53b09bfcb7 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1216,7 +1216,7 @@ ActiveRecord::Schema.define(version: 20180529093006) do
t.boolean "discussion_locked"
t.integer "latest_merge_request_diff_id"
t.string "rebase_commit_sha"
- t.boolean "allow_maintainer_to_push"
+ t.boolean "allow_collaboration"
t.boolean "squash", default: false, null: false
end