Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/educoder into develop
commit
c282bf6d92
@ -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