started implementing teams

This commit is contained in:
Hauke Klement
2015-01-28 12:28:09 +01:00
parent cf346e2271
commit dd624b26c8
25 changed files with 355 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
class CreateTeams < ActiveRecord::Migration
def change
create_table :teams do |t|
t.string :name
t.timestamps
end
end
end

View File

@@ -0,0 +1,8 @@
class CreateInternalUsersTeams < ActiveRecord::Migration
def change
create_table :internal_users_teams do |t|
t.belongs_to :internal_user, index: true
t.belongs_to :team, index: true
end
end
end

View File

@@ -0,0 +1,5 @@
class AddTeamIdToExercises < ActiveRecord::Migration
def change
add_reference :exercises, :team
end
end