mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-11 00:52:29 +01:00
0e94f8c3d4
This reverts commit 4cbfbdc4e0f9a271d0fe13459a7b0f93de2c013a.
14 lines
348 B
Ruby
14 lines
348 B
Ruby
class MigrateSlotsReservations < ActiveRecord::Migration
|
|
def up
|
|
Slot.all.each do |slot|
|
|
SlotsReservation.create!({slot_id: slot.id, reservation_id: slot.reservation_id})
|
|
end
|
|
end
|
|
|
|
def down
|
|
SlotsReservation.all.each do |sr|
|
|
Slot.find(sr.slot_id).update_attributes(:reservation_id => sr.reservation_id)
|
|
end
|
|
end
|
|
end
|