Sha256: 8a30ad6abd2694b0ad9d90134e768b47f965807982784451110491c14d428b39
Contents?: true
Size: 696 Bytes
Versions: 14
Compression:
Stored size: 696 Bytes
Contents
# -*- encoding : utf-8 -*- class UpdateLinkType < ActiveRecord::Migration class TmpReference < ActiveRecord::Base self.table_name = "card_references" end def up TmpReference.update_all(present: 1) TmpReference.where(link_type: "T").update_all(link_type: "I") TmpReference.where(link_type: "M").update_all(present: 0, link_type: "L") TmpReference.where(link_type: "W").update_all(present: 0, link_type: "I") end def down TmpReference.where(present: 0, link_type: "L").update_all(link_type: "M") TmpReference.where(present: 0, link_type: "I").update_all(link_type: "W") TmpReference.where(present: 1, link_type: "I").update_all(link_type: "T") end end
Version data entries
14 entries across 14 versions & 1 rubygems