Sha256: aaac66ea104e473b67c6532352d53e8ee187bdbe877c65e17b518d92f0934dbf
Contents?: true
Size: 762 Bytes
Versions: 9
Compression:
Stored size: 762 Bytes
Contents
# This migration comes from spree (originally 20131001013410) class RemoveUnusedCreditCardFields < ActiveRecord::Migration[4.2] def up remove_column :spree_credit_cards, :start_month if column_exists?(:spree_credit_cards, :start_month) remove_column :spree_credit_cards, :start_year if column_exists?(:spree_credit_cards, :start_year) remove_column :spree_credit_cards, :issue_number if column_exists?(:spree_credit_cards, :issue_number) end def down add_column :spree_credit_cards, :start_month, :string add_column :spree_credit_cards, :start_year, :string add_column :spree_credit_cards, :issue_number, :string end def column_exists?(table, column) ApplicationRecord.connection.column_exists?(table, column) end end
Version data entries
9 entries across 9 versions & 2 rubygems