Sha256: 908a03ffc7e414f854d7cba0a3a1ac103fce5052b763122ab42b5972637d92c7

Contents?: true

Size: 630 Bytes

Versions: 38

Compression:

Stored size: 630 Bytes

Contents

class CreatePrices < ActiveRecord::Migration
  def change
    create_table :prices, options: 'DEFAULT CHARSET=utf8' do |t|
      t.references  :listing, index: true, null: false, foreign_key: true
      t.references  :currency_period, index: true

      t.string :type, null: false
      t.integer     :list_price, limit: 8
      t.string      :currency_code, default: "USD"
      t.integer     :list_price_low, limit: 8
      t.string      :currency_code_low, default: "USD"

      t.timestamps
    end
    add_index :prices, [:list_price, :currency_code]
    add_index :prices, :list_price
    add_index :prices, :type
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
reso-0.1.4.9 lib/generators/reso/templates/create_prices.rb
reso-0.1.4.8 lib/generators/reso/templates/create_prices.rb
reso-0.1.4.7 lib/generators/reso/templates/create_prices.rb
reso-0.1.4.6 lib/generators/reso/templates/create_prices.rb
reso-0.1.4.5 lib/generators/reso/templates/create_prices.rb
reso-0.1.4.4 lib/generators/reso/templates/create_prices.rb
reso-0.1.4.3 lib/generators/reso/templates/create_prices.rb
reso-0.1.4.2 lib/generators/reso/templates/create_prices.rb
reso-0.1.4.1 lib/generators/reso/templates/create_prices.rb
reso-0.1.4.0 lib/generators/reso/templates/create_prices.rb
reso-0.1.3.1 lib/generators/reso/templates/create_prices.rb
reso-0.1.3.0 lib/generators/reso/templates/create_prices.rb
reso-0.1.2.0 lib/generators/reso/templates/create_prices.rb
reso-0.1.1.0 lib/generators/reso/templates/create_prices.rb
reso-0.1.0.3 lib/generators/reso/templates/create_prices.rb
reso-0.1.0.2 lib/generators/reso/templates/create_prices.rb
reso-0.1.0.1 lib/generators/reso/templates/create_prices.rb
reso-0.1.0.0 lib/generators/reso/templates/create_prices.rb