Sha256: cdfa5b88b2b218479e847258cebd192668e4f8205dccc1073d09feefafd6b9cb

Contents?: true

Size: 1.32 KB

Versions: 9

Compression:

Stored size: 1.32 KB

Contents

class CreateLogisticsCoreSpecialIncrementContentRates < ActiveRecord::Migration[5.0]
  def change
    create_table :logistics_core_special_increment_content_rates do |t|
      t.references :content_type, index: { name: 'sicr_on_ct_indx' }
      t.float :rate
      t.date :effective_date

      t.timestamps
    end

    create_table :logistics_core_chargeable_service_content_type_rates, id: false do |t|
      t.belongs_to :special_increment_content_rate, index: false
      t.belongs_to :chargeable_service_unit_of_charge, index: false
    end

    add_index(:logistics_core_chargeable_service_content_type_rates, [ :special_increment_content_rate_id,
                                                                         :chargeable_service_unit_of_charge_id],
              :name => 'idx_content_type_special_increment_1')

    add_foreign_key :logistics_core_chargeable_service_content_type_rates, :logistics_core_special_increment_content_rates,
                    :column => :special_increment_content_rate_id
    add_foreign_key :logistics_core_chargeable_service_content_type_rates, :logistics_core_chargeable_service_unit_of_charges,
                    :column => :chargeable_service_unit_of_charge_id
    add_foreign_key :logistics_core_special_increment_content_rates, :logistics_core_lookups, :column => :content_type_id
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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