Sha256: 14deb9aff79253ba62c83429e5c88b20e6763fada9477f02bf254eb8ef275336

Contents?: true

Size: 948 Bytes

Versions: 5

Compression:

Stored size: 948 Bytes

Contents

class CreateMksRateChargeableServices < ActiveRecord::Migration[5.1]
  def change
    create_table :mks_rate_chargeable_services do |t|
      t.string :code, null: false
      t.string :name, null: false
      t.integer :service_type_id, index: { name: 'st_on_cs_indx' }
      t.integer :base_unit_id, index: {name: 'bu_on_cs_indx' }
      t.integer :utilization_unit_id, index: { name: 'uu_on_cs_indx' }
      t.integer :service_delivery_unit_id, index: { name: 'sdu_on_cs_indx' }

      t.timestamps
    end

    add_foreign_key :mks_rate_chargeable_services, :mks_rate_service_types, column: :service_type_id
    add_foreign_key :mks_rate_chargeable_services, :mks_rate_unit_of_charges, column: :base_unit_id
    add_foreign_key :mks_rate_chargeable_services, :mks_rate_unit_of_charges, column: :utilization_unit_id
    add_foreign_key :mks_rate_chargeable_services, :mks_rate_service_delivery_units, column: :service_delivery_unit_id
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mks_rate-1.0.5 db/migrate/20171214152030_create_mks_rate_chargeable_services.rb
mks_rate-1.0.4 db/migrate/20171214152030_create_mks_rate_chargeable_services.rb
mks_rate-1.0.3 db/migrate/20171214152030_create_mks_rate_chargeable_services.rb
mks_rate-1.0.2 db/migrate/20171214152030_create_mks_rate_chargeable_services.rb
mks_rate-1.0.1 db/migrate/20171214152030_create_mks_rate_chargeable_services.rb