Sha256: 5e6a7babb3cf5c9e9c9c976c22f75ef7cf61e83af5bf997861c678364cfbb042

Contents?: true

Size: 1009 Bytes

Versions: 6

Compression:

Stored size: 1009 Bytes

Contents

class AddCustomerFields < ActiveRecord::Migration
  def change
    add_column Tang.customer_class.to_s.downcase.pluralize, :stripe_id, :string
    add_column Tang.customer_class.to_s.downcase.pluralize, :account_balance, :integer
    add_column Tang.customer_class.to_s.downcase.pluralize, :business_vat_id, :string
    add_column Tang.customer_class.to_s.downcase.pluralize, :currency, :string
    add_column Tang.customer_class.to_s.downcase.pluralize, :delinquent, :boolean, null: false, default: false
    add_column Tang.customer_class.to_s.downcase.pluralize, :description, :string
    add_column Tang.customer_class.to_s.downcase.pluralize, :active_until, :timestamp
    add_column Tang.customer_class.to_s.downcase.pluralize, :coupon_id, :integer, index: true, foreign_key: true
    add_column Tang.customer_class.to_s.downcase.pluralize, :coupon_start, :timestamp
    add_column Tang.customer_class.to_s.downcase.pluralize, :subscription_coupon_id, :integer, index: true, foreign_key: true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tang-0.2.2 db/migrate/20160929152541_add_customer_fields.rb
tang-0.2.1 db/migrate/20160929152541_add_customer_fields.rb
tang-0.2.0 db/migrate/20160929152541_add_customer_fields.rb
tang-0.1.0 db/migrate/20160929152541_add_customer_fields.rb
tang-0.0.9 db/migrate/20160929152541_add_customer_fields.rb
tang-0.0.8 db/migrate/20160929152541_add_customer_fields.rb