summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-12-11 13:25:27 +0000
committerSean McGivern <sean@gitlab.com>2017-12-11 14:09:55 +0000
commit818397f96ee81a2a21d5a01e56239507ea79c811 (patch)
tree8ae89d6224d4a2a7ed8909cb4c963bacfa85bc41 /db
parentdd45a1748920a555d107eaf8bfd4219ed2d4f987 (diff)
downloadgitlab-ce-818397f96ee81a2a21d5a01e56239507ea79c811.tar.gz
Add spec for removing issues.assignee_id
This migration also needs to be a post-deployment migration, as it removes a column.
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20170523073948_remove_assignee_id_from_issue.rb (renamed from db/migrate/20170523073948_remove_assignee_id_from_issue.rb)4
1 files changed, 3 insertions, 1 deletions
diff --git a/db/migrate/20170523073948_remove_assignee_id_from_issue.rb b/db/post_migrate/20170523073948_remove_assignee_id_from_issue.rb
index 91b04023fc2..006d17b4d62 100644
--- a/db/migrate/20170523073948_remove_assignee_id_from_issue.rb
+++ b/db/post_migrate/20170523073948_remove_assignee_id_from_issue.rb
@@ -41,6 +41,8 @@ class RemoveAssigneeIdFromIssue < ActiveRecord::Migration
update_value = Arel.sql('(SELECT user_id FROM issue_assignees WHERE issue_assignees.issue_id = issues.id LIMIT 1)')
- update_column_in_batches(:issues, :assignee_id, update_value)
+ # This is only used in the down step, so we can ignore the RuboCop warning
+ # about large tables, as this is very unlikely to be run on GitLab.com
+ update_column_in_batches(:issues, :assignee_id, update_value) # rubocop:disable Migration/UpdateLargeTable
end
end