parent
4cd1fb2f69
commit
39e0aa25e0
@ -0,0 +1,5 @@
|
||||
class AddLaboratoryIdToLibraries < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_reference :libraries, :laboratory
|
||||
end
|
||||
end
|
@ -0,0 +1,7 @@
|
||||
class TransferLaboratoryData < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
Course.where(laboratory_id: nil).update_all(laboratory_id: 1)
|
||||
Competition.where(laboratory_id: nil).update_all(laboratory_id: 1)
|
||||
Library.where(laboratory_id: nil).update_all(laboratory_id: 1)
|
||||
end
|
||||
end
|
Loading…
Reference in new issue