Sha256: f58dc448b17d5e5d171bb0ae02e3ad4267c67453be88400a29c18a4e946aefd5
Contents?: true
Size: 700 Bytes
Versions: 51
Compression:
Stored size: 700 Bytes
Contents
# -*- encoding : utf-8 -*- class UpdateLinkType < ActiveRecord::Migration[4.2] class TmpReference < ApplicationRecord 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
51 entries across 51 versions & 1 rubygems