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.0 lib/generators/curupira/templates/db/migrate/create_group_users.rb