Fix migration that fails in build
This commit is contained in:
parent
df682e65e5
commit
08bbd1ffa1
|
@ -6,7 +6,10 @@ end
|
|||
|
||||
class PopulateConferenceIdInPersonalProfiles < ActiveRecord::Migration
|
||||
def change
|
||||
conference = Conference.first!
|
||||
PersonalProfile.where(conference_id: nil).update_all(conference_id: conference.id)
|
||||
conference = Conference.first
|
||||
|
||||
if conference
|
||||
PersonalProfile.where(conference_id: nil).update_all(conference_id: conference.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue