clarion/db/migrate/20150530182857_populate_con...

16 lines
340 B
Ruby
Raw Permalink Normal View History

class Conference < ActiveRecord::Base
end
class PersonalProfile < ActiveRecord::Base
end
class PopulateConferenceIdInPersonalProfiles < ActiveRecord::Migration[4.2]
def change
2015-07-12 11:22:19 +03:00
conference = Conference.first
if conference
PersonalProfile.where(conference_id: nil).update_all(conference_id: conference.id)
end
end
end