Sha256: 741a6d94ba7863e4493da790b28e85c9fc90ecd6a2ffa37f08e4e195a447545a

Contents?: true

Size: 1.22 KB

Versions: 9

Compression:

Stored size: 1.22 KB

Contents

class CreateLogisticsCoreSelfDrivingRates < ActiveRecord::Migration[5.0]
  def change
    create_table :logistics_core_self_driving_rates do |t|
      t.references :break_bulk_unit, index: { name: 'sdr_on_bbu_indx' }
      t.float :margin
      t.decimal :rate
      t.references :rate_period, index: { name: 'sdr_on_trp_indx' }
      t.string :rate_type
      t.references :route, index: { name: 'sdr_on_route_indx' }
      t.references :selected_transporter, index: { name: 'sdr_on_st_indx' }
      t.references :transporter, index: { name: 'sdr_on_transporter_indx' }

      t.timestamps
    end

    add_foreign_key :logistics_core_self_driving_rates, :logistics_core_lookups, :column => :break_bulk_unit_id
    add_foreign_key :logistics_core_self_driving_rates, :logistics_core_transport_rate_periods,
                    :column => :rate_period_id
    add_foreign_key :logistics_core_self_driving_rates, :logistics_core_routes, :column => :route_id
    add_foreign_key :logistics_core_self_driving_rates, :logistics_core_transporters, :column => :transporter_id,
                    :name => 'fk_sdr_on_trans'
    add_foreign_key :logistics_core_self_driving_rates, :logistics_core_transporters, :column => :selected_transporter_id
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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