class InsertConstituencies < ActiveRecord::Migration - InsertConstituencies has no descriptive comment
def up - InsertConstituencies#up doesn't depend on instance state (maybe move it to another class?)
constituency_ids = ConstituencyPetitionJournal.distinct.pluck(:constituency_id)
constituency_ids.each do |constituency_id|
signature = Signature.where(constituency_id: constituency_id).order(nil).first
signature.constituency if signature
end
end
def down - InsertConstituencies#down doesn't depend on instance state (maybe move it to another class?)
Constituency.delete_all
end
end