Created role model
This commit is contained in:
9
db/migrate/20130128051640_create_roles.rb
Normal file
9
db/migrate/20130128051640_create_roles.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class CreateRoles < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :roles do |t|
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
5
db/migrate/20130128051658_add_role_id_to_user.rb
Normal file
5
db/migrate/20130128051658_add_role_id_to_user.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddRoleIdToUser < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :role_id, :integer
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user