Changing UserRole to UserRoleJoin

Beware, this breaks the view for some reason
This commit is contained in:
Jason Denney
2013-04-23 23:21:17 -04:00
parent a3fcdec10c
commit 91bb2ea43e
17 changed files with 100 additions and 37 deletions
@@ -0,0 +1,9 @@
class AlterUserRoles < ActiveRecord::Migration
def change
rename_table :user_roles, :user_role_joins
change_table :user_role_joins do |t|
t.rename :role, :role_id
t.remove :id
end
end
end
+8
View File
@@ -0,0 +1,8 @@
class AddRoles < ActiveRecord::Migration
def change
create_table(:roles) do |t|
t.string :role
t.timestamps
end
end
end
+5
View File
@@ -0,0 +1,5 @@
class AlterUser < ActiveRecord::Migration
def change
remove_column :users, :user_role_id
end
end