class ModifyWechatSupportForShixuns < ActiveRecord::Migration[5.2]
  def change
    name = ["Python基础", "C语言基础", "C++基础", "Java"]
    shixuns = Shixun.includes(:tag_repertoires)
                  .where(tag_repertoires: {name: name}, shixuns: {status: 2, hide_code: false})
    shixuns.update_all(is_wechat_support: true)
  end
end
