Sha256: 946b5089303eac489efc0c399c1d387f27f1bcb4b096cd29175841cb7b2467fd

Contents?: true

Size: 605 Bytes

Versions: 6

Compression:

Stored size: 605 Bytes

Contents

class AddStripeIndexes < ActiveRecord::Migration
  def change
    add_index Tang.customer_class.to_s.downcase.pluralize, :stripe_id, unique: true
    add_index :tang_cards, :stripe_id, unique: true
    add_index :tang_charges, :stripe_id, unique: true
    add_index :tang_coupons, :stripe_id, unique: true
    add_index :tang_invoices, :stripe_id, unique: true
    add_index :tang_invoice_items, :stripe_id, unique: true
    add_index :tang_plans, :stripe_id, unique: true
    add_index :tang_stripe_webhooks, :stripe_id, unique: true
    add_index :tang_subscriptions, :stripe_id, unique: true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tang-0.2.2 db/migrate/20170701162853_add_stripe_indexes.rb
tang-0.2.1 db/migrate/20170701162853_add_stripe_indexes.rb
tang-0.2.0 db/migrate/20170701162853_add_stripe_indexes.rb
tang-0.1.0 db/migrate/20170701162853_add_stripe_indexes.rb
tang-0.0.9 db/migrate/20170701162853_add_stripe_indexes.rb
tang-0.0.8 db/migrate/20170701162853_add_stripe_indexes.rb