Class: RadminCreateRoles

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/radmin/templates/migrations/02_radmin_create_roles.rb

Class Method Summary collapse

Class Method Details

.downObject



10
11
12
# File 'lib/generators/radmin/templates/migrations/02_radmin_create_roles.rb', line 10

def self.down
  drop_table :radmin_roles
end

.upObject



2
3
4
5
6
7
8
# File 'lib/generators/radmin/templates/migrations/02_radmin_create_roles.rb', line 2

def self.up
  create_table :radmin_roles do |t|
    t.string :name, :limit => 20, :null => false
    t.timestamps
  end
  add_index :radmin_roles, :name, :unique => true
end