diff options
Diffstat (limited to 'db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb')
-rw-r--r-- | db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb b/db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb index 0886a655aa2..2f339172eeb 100644 --- a/db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb +++ b/db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb @@ -9,9 +9,11 @@ class RemoveProjectLabelsGroupIdCopy < ActiveRecord::Migration disable_ddl_transaction! def up + # rubocop:disable Migration/UpdateColumnInBatches update_column_in_batches(:labels, :group_id, nil) do |table, query| query.where(table[:type].eq('ProjectLabel').and(table[:group_id].not_eq(nil))) end + # rubocop:enable Migration/UpdateColumnInBatches end def down |