Sha256: 2d91c4fdf44818950f74b489c94295180fa4f9e150cf50a150226470575a5b39
Contents?: true
Size: 696 Bytes
Versions: 105
Compression:
Stored size: 696 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
105 entries across 105 versions & 2 rubygems