Sha256: 8758e071142bad713cfc70c9c7d8d001acd38deb035112b2b84fcb9ce34534f7

Contents?: true

Size: 1.36 KB

Versions: 9

Compression:

Stored size: 1.36 KB

Contents

class CreateLogisticsCoreSpecialIncrementContainerRates < ActiveRecord::Migration[5.0]
  def change
    create_table :logistics_core_special_increment_container_rates do |t|
      t.references :container_type, index: { name: 'sicr_on_cnt_indx' }
      t.float :rate
      t.date :effective_date

      t.timestamps
    end

    create_table :logistics_core_chargeable_service_container_type_rates, id: false do |t|
      t.belongs_to :special_increment_container_rate, index: false
      t.belongs_to :chargeable_service_unit_of_charge, index: false
    end

    add_index(:logistics_core_chargeable_service_container_type_rates, [ :special_increment_container_rate_id,
                                                              :chargeable_service_unit_of_charge_id],
              :name => 'idx_container_type_special_increment_1')

    add_foreign_key :logistics_core_chargeable_service_container_type_rates, :logistics_core_special_increment_container_rates,
                    :column => :special_increment_container_rate_id
    add_foreign_key :logistics_core_chargeable_service_container_type_rates, :logistics_core_chargeable_service_unit_of_charges,
                    :column => :chargeable_service_unit_of_charge_id
    add_foreign_key :logistics_core_special_increment_container_rates, :logistics_core_lookups,
                    :column => :container_type_id
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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