Sha256: 4dfbdcd89657bbb569a393242c86ba7142fbf2d112287fba02bd759b1591e282

Contents?: true

Size: 332 Bytes

Versions: 21

Compression:

Stored size: 332 Bytes

Contents

class CreateGroupUsers < ActiveRecord::Migration
  def change
    create_table :group_users do |t|
      t.belongs_to :group, index: true
      t.belongs_to :user, index: true
      t.boolean :active

      t.timestamps null: false
    end
    add_foreign_key :group_users, :groups
    add_foreign_key :group_users, :users
  end
end

Version data entries

21 entries across 7 versions & 1 rubygems

Version Path
curupira-0.1.7 lib/generators/curupira/templates/db/migrate/create_group_users.rb
curupira-0.1.7 spec/tmp/db/migrate/20170509173927_create_group_users.rb
curupira-0.1.7 spec/dummy/db/migrate/20150305011947_create_group_users.rb
curupira-0.1.6 spec/tmp/db/migrate/20170509170656_create_group_users.rb
curupira-0.1.6 spec/dummy/db/migrate/20150305011947_create_group_users.rb
curupira-0.1.6 lib/generators/curupira/templates/db/migrate/create_group_users.rb
curupira-0.1.4 spec/dummy/db/migrate/20150305011947_create_group_users.rb
curupira-0.1.4 lib/generators/curupira/templates/db/migrate/create_group_users.rb
curupira-0.1.4 spec/tmp/db/migrate/20160930024820_create_group_users.rb
curupira-0.1.3 spec/dummy/db/migrate/20150305011947_create_group_users.rb
curupira-0.1.3 lib/generators/curupira/templates/db/migrate/create_group_users.rb
curupira-0.1.3 spec/tmp/db/migrate/20150323194125_create_group_users.rb
curupira-0.1.2 spec/tmp/db/migrate/20150320032245_create_group_users.rb
curupira-0.1.2 spec/dummy/db/migrate/20150305011947_create_group_users.rb
curupira-0.1.2 lib/generators/curupira/templates/db/migrate/create_group_users.rb
curupira-0.1.1 lib/generators/curupira/templates/db/migrate/create_group_users.rb
curupira-0.1.1 spec/tmp/db/migrate/20150319143761_create_group_users.rb
curupira-0.1.1 spec/dummy/db/migrate/20150305011947_create_group_users.rb
curupira-0.1.0 spec/dummy/db/migrate/20150305011947_create_group_users.rb
curupira-0.1.0 spec/tmp/db/migrate/20150318190318_create_group_users.rb