Class: CreateGroup

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/migrations/20150221024519_create_group.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/migrations/20150221024519_create_group.rb', line 2

def change
  create_table :groups do |t|
    t.string :group_name
    t.string :slug
    t.boolean :can_alter, default: true
    t.boolean :can_delete, default: true
  end

  add_index :groups, :slug
end