Show More
Commit Description:
initial commit...
Commit Description:
initial commit
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@1 6386c4cd-e34a-4fa8-8920-d93eb39b512e
References:
File last commit:
Show/Diff file:
Action:
db/migrate/006_create_roles.rb
| 19 lines
| 379 B
| text/x-ruby
| RubyLexer
|
|
r0 | class CreateRoles < ActiveRecord::Migration | ||
def self.up | ||||
create_table :roles do |t| | ||||
t.column 'name', :string | ||||
end | ||||
create_table :roles_users, :id => false do |t| | ||||
t.column 'role_id', :integer | ||||
t.column 'user_id', :integer | ||||
end | ||||
add_index :roles_users, :user_id | ||||
end | ||||
def self.down | ||||
drop_table :roles_users | ||||
drop_table :roles | ||||
end | ||||
end | ||||