Class: CreateReleafPermissions

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/releaf/templates/migrations/create_releaf_permissions.rb

Instance Method Summary collapse

Instance Method Details

#changeObject


2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/releaf/templates/migrations/create_releaf_permissions.rb', line 2

def change
  create_table :releaf_permissions do |t|
    t.integer :owner_id
    t.string :owner_type
    t.string  :permission
    t.timestamps(null: false)
  end
  add_index :releaf_permissions, [:owner_id, :owner_type]
  add_index :releaf_permissions, :permission
end