Sha256: 55a4bea6185ed1251bc6b1eee30743ea212c697b9c0b8d5bb422359de60ce730

Contents?: true

Size: 622 Bytes

Versions: 2

Compression:

Stored size: 622 Bytes

Contents

class CreateSocialFrameworkRoutes < ActiveRecord::Migration
  def change
    create_table :social_framework_routes do |t|

      t.string :title, null: false
      t.integer :distance, null: false
      t.integer :accepted_deviation, null: false, default: 0
      t.string :mode_of_travel, null: false, default: "driving"
      t.timestamps null: false
    end

    create_table :social_framework_routes_users do |t|

      t.belongs_to :user, null: false, index: true
      t.belongs_to :route, null: false, index: true
    end

    add_index :social_framework_routes_users, [:user_id, :route_id], unique: true
  end
end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
social_framework-1.0.1 db/migrate/20160516122239_create_social_framework_routes.rb
social_framework-1.0.1 db/tmp/migrate/20160516122239_create_social_framework_routes.rb