Sha256: daa97ff8d0451cc83b15458c88d58cf3c784d1dca28afd0ecd91e605cc7b5a03

Contents?: true

Size: 905 Bytes

Versions: 9

Compression:

Stored size: 905 Bytes

Contents

class CreateLogisticsCoreServiceRates < ActiveRecord::Migration[5.0]
  def change
    create_table :logistics_core_service_rates do |t|
      t.references :container_size, index: { name: 'sr_on_cs_indx' }
      t.references :transaction_type, index: { name: 'sr_on_tt_indx' }
      t.references :chargeable_service_unit_of_charge, index: { name: 'sr_on_csuoc_indx' }
      t.float :low
      t.float :medium
      t.float :high
      t.date :effective_date
      t.float :margin

      t.timestamps
    end

    add_foreign_key :logistics_core_service_rates, :logistics_core_lookups, :column => :container_size_id
    add_foreign_key :logistics_core_service_rates, :logistics_core_lookups, :column => :transaction_type_id
    add_foreign_key :logistics_core_service_rates, :logistics_core_chargeable_service_unit_of_charges,
                    :column => :chargeable_service_unit_of_charge_id

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logistics_core-21.11.2 db/migrate/20170107102732_create_logistics_core_service_rates.rb
logistics_core-21.11.1 db/migrate/20170107102732_create_logistics_core_service_rates.rb
logistics_core-21.08.1 db/migrate/20170107102732_create_logistics_core_service_rates.rb
logistics_core-21.03.1 db/migrate/20170107102732_create_logistics_core_service_rates.rb
logistics_core-20.10.3 db/migrate/20170107102732_create_logistics_core_service_rates.rb
logistics_core-20.10.2 db/migrate/20170107102732_create_logistics_core_service_rates.rb
logistics_core-20.10.1 db/migrate/20170107102732_create_logistics_core_service_rates.rb
logistics_core-20.9.1 db/migrate/20170107102732_create_logistics_core_service_rates.rb
logistics_core-20.8.1 db/migrate/20170107102732_create_logistics_core_service_rates.rb