commit
e98166d2ab
@ -0,0 +1,5 @@
|
||||
class AddIsDeleteToTiding < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :tidings, :is_delete, :boolean, default: 0
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class UpdateTidingsDeleteStatus < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
Tiding.where.not(container_type: 'DeleteCourse').where(belong_container_type: "Course", belong_container_id: Course.where(is_delete: 1).pluck(:id)).update_all(is_delete: 1)
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class DeleteColumnTiding < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
remove_column :tidings, :delete
|
||||
end
|
||||
end
|
Loading…
Reference in new issue