Sha256: c27503b8d80cb424c2a33ad31ae83ace2db23e5ed452d2a3c4fafdba49de0607

Contents?: true

Size: 549 Bytes

Versions: 1

Compression:

Stored size: 549 Bytes

Contents

class CreateProjectOrganizations < ActiveRecord::Migration
  def change
    create_table :project_organizations do |t|
      t.references  :project, null: false
      t.foreign_key :projects
      t.references  :organization, null: false
      t.foreign_key :organizations

      t.timestamps
    end

    add_index :project_organizations, :id
    add_index :project_organizations, :project_id
    add_index :project_organizations, :organization_id
    add_index :project_organizations, [:project_id, :organization_id],
      unique: true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
self_systeem-0.1.0 test/dummy_app/db/migrate/20140314033115_create_project_organizations.rb