Sha256: d4ffdb82ee1670f90afe158765795722920b5a7cce22831b77f24fcb8de18535

Contents?: true

Size: 561 Bytes

Versions: 4

Compression:

Stored size: 561 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.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

4 entries across 2 versions & 1 rubygems

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