Class: CreatePermission

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/migrations/20150221024409_create_permission.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



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

def change
  create_table :permissions do |t|
    t.string :permission_name
    t.string :slug
    t.boolean :can_alter, default: true
    t.boolean :can_delete, default: true
    t.timestamps
  end

  add_index :permissions, :slug
end