Sha256: 914ef2854c8a54dad99567c13c4ad71f05faa41772e310fb1f009837b6315d81
Contents?: true
Size: 697 Bytes
Versions: 11
Compression:
Stored size: 697 Bytes
Contents
class RemoveUnusedCreditCardFields < ActiveRecord::Migration 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) ActiveRecord::Base.connection.column_exists?(table, column) end end
Version data entries
11 entries across 11 versions & 1 rubygems