debian-mirror-gitlab/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb

18 lines
444 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class ResetRelativePositionForIssue < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
update_column_in_batches(:issues, :relative_position, nil) do |table, query|
query.where(table[:relative_position].not_eq(nil))
end
end
def down
end
end