Sha256: 354abf3c245eabce3c596350db3bc6d208b5569a4bf0665f7531cdad5f948b14

Contents?: true

Size: 1.25 KB

Versions: 9

Compression:

Stored size: 1.25 KB

Contents

class CreateLogisticsCoreCarCarrierRates < ActiveRecord::Migration[5.0]
  def change
    create_table :logistics_core_car_carrier_rates do |t|
      t.references :route, index: { name: 'ccr_on_route_indx' }
      t.references :break_bulk_unit, index: { name: 'ccr_on_bbu_indx' }
      t.float :rate
      t.float :margin
      t.references :transporter, index: { name: 'ccr_on_transporter_indx' }
      t.references :transport_rate_period, index: { name: 'ccr_on_trp_indx' }
      t.string :rate_type
      t.references :selected_transporter, index: { name: 'ccr_on_st_indx' }

      t.timestamps
    end

    add_foreign_key :logistics_core_car_carrier_rates, :logistics_core_routes, :column => :route_id
    add_foreign_key :logistics_core_car_carrier_rates, :logistics_core_lookups, :column => :break_bulk_unit_id
    add_foreign_key :logistics_core_car_carrier_rates, :logistics_core_transporters, :column => :transporter_id
    add_foreign_key :logistics_core_car_carrier_rates, :logistics_core_transport_rate_periods,
                    :column => :transport_rate_period_id
    add_foreign_key :logistics_core_car_carrier_rates, :logistics_core_transporters, :column => :selected_transporter_id,
                    :name => 'fk_ccr_on_selected_transporter'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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