Sha256: ce2ab0a1cd1a70462736ec19cf03c117c78fa8246a11142a1a7182bbe1b865b8

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

class CreateProjectUsers < ActiveRecord::Migration
  def change
    create_table :project_users do |t|
      t.references :project, null: false
      t.foreign_key :projects
      t.references :user, null: false
      t.foreign_key :users
      t.string     :role
      t.timestamps
    end

    add_index :project_users, :id
    add_index :project_users, :project_id
    add_index :project_users, :user_id
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
self_systeem-0.1.0 test/dummy_app/db/migrate/20140312193750_create_project_users.rb