Sha256: e82b918ae46cd8c6a8c70964b0eb17ae1573f0cef2928e98d07d6b6db7e78ac4
Contents?: true
Size: 695 Bytes
Versions: 4
Compression:
Stored size: 695 Bytes
Contents
# -*- encoding : utf-8 -*- class UpdateLinkType < Cardio::Migration::Schema class TmpReference < Cardio::Record 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
4 entries across 4 versions & 1 rubygems