Sha256: 80f1c0b3e66b71de244c23e314f6f1220a4115591eac92fc5be39406bcbdbb99

Contents?: true

Size: 811 Bytes

Versions: 9

Compression:

Stored size: 811 Bytes

Contents

class CreateLogisticsCoreRoutes < ActiveRecord::Migration[5.0]
  def change
    create_table :logistics_core_routes do |t|
      t.references :from, index: { name: 'route_on_rl_from_indx' }
      t.references :to, index: { name: 'route_on_rl_to_indx' }
      t.string :description
      t.references :node, index: { name: 'route_on_rl_node_indx' }
      t.string :zone
      t.float :radius
      t.string :route_type
      t.float :margin

      t.timestamps
    end

    add_foreign_key :logistics_core_routes, :logistics_core_lookups, :column => :from_id, name: 'fk_route_from'
    add_foreign_key :logistics_core_routes, :logistics_core_lookups, :column => :to_id, name: 'fk_route_to'
    add_foreign_key :logistics_core_routes, :logistics_core_lookups, :column => :node_id, name: 'fk_route_node'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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