Sha256: 56541d711d1e75c12bae2119244ae8f69cb8359f7a921c8934a2c67c4fdb4e12

Contents?: true

Size: 980 Bytes

Versions: 3

Compression:

Stored size: 980 Bytes

Contents

# This migration comes from spree (originally 20150118210639)
class CreateSpreeStoreCredits < ActiveRecord::Migration[4.2]
  def change
    create_table :spree_store_credits do |t|
      t.references :user
      t.references :category
      t.references :created_by
      t.decimal :amount, precision: 8, scale: 2, default: 0.0, null: false
      t.decimal :amount_used, precision: 8, scale: 2, default: 0.0, null: false
      t.text :memo
      t.datetime :deleted_at
      t.string :currency
      t.decimal :amount_authorized, precision: 8, scale: 2, default: 0.0, null: false
      t.integer :originator_id
      t.string :originator_type
      t.integer :type_id
      t.timestamps null: false, precision: 6
    end

    add_index :spree_store_credits, :deleted_at
    add_index :spree_store_credits, :user_id
    add_index :spree_store_credits, :type_id
    add_index :spree_store_credits, [:originator_id, :originator_type], name: :spree_store_credits_originator
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
spree_purchase_order-3.7.0 spec/dummy/db/migrate/20191113195905_create_spree_store_credits.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091846_create_spree_store_credits.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091846_create_spree_store_credits.spree.rb