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