Class: CreateRole
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateRole
- Defined in:
- lib/migrations/20150221024159_create_role.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/migrations/20150221024159_create_role.rb', line 2 def change create_table :roles do |t| t.string :role_name t.string :slug t.boolean :can_alter, default: true t.boolean :can_delete, default: true t. end add_index :roles, :slug end |