Sha256: 7275c4fd3eb0da86610d6429681513562cb1293f3619eefbe5cddc6914f36ee3
Contents?: true
Size: 552 Bytes
Versions: 1
Compression:
Stored size: 552 Bytes
Contents
class CreateOrganizationUsers < ActiveRecord::Migration def change create_table :organization_users do |t| t.references :organization, null: false t.foreign_key :organizations t.references :user, null: false t.foreign_key :users t.string :role, null: false t.timestamps end add_index :organization_users, :id add_index :organization_users, :organization_id add_index :organization_users, :user_id add_index :organization_users, [:organization_id, :user_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/20140313222656_create_organization_users.rb |