Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun
commit
c9ee929361
@ -0,0 +1,18 @@
|
||||
class ModifyKeContentsForMarkdown < ActiveRecord::Migration[5.2]
|
||||
# include ActionView::Helpers::SanitizeHelper
|
||||
def change
|
||||
# def ke_transform_to_md content
|
||||
# sanitize(content, tags: %w(img a span), attributes: %w(src href target style))
|
||||
# .gsub(/^(\n)/, "").gsub(/(\n)+/, "<br />").gsub(/$(\n)/, "")
|
||||
# .gsub(/(\n)+/, "<br />").gsub("\t", " ")
|
||||
# end
|
||||
#
|
||||
# MessageDetail.find_each do |m|
|
||||
# content = ke_transform_to_md m.content
|
||||
# puts("content:#{content}")
|
||||
# m.update_column(:content, content)
|
||||
# end
|
||||
|
||||
|
||||
end
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
class MigrateAnonymousTidingType < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
Tiding.where(container_type: "StudentWorksScore", extra: "3").update_all(tiding_type: "System", trigger_user_id: 0)
|
||||
Tiding.where(container_type: "StudentWorksScoresAppeal", parent_container_type: "StudentWork", tiding_type: "HomeworkCommon").update_all(tiding_type: "System", trigger_user_id: 0)
|
||||
end
|
||||
end
|
Loading…
Reference in new issue