diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-07 00:03:52 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-07 00:03:52 -0500 |
commit | fff1ca96f63833d7d08ca3f95fb13284e517b69d (patch) | |
tree | 5553f1e07f642adf6ac838fa3501d2dfca82f6a4 | |
parent | 88204381fbdef9d9f80d796b695b1e7e0b8f6814 (diff) |
fix the TeamUserJoinTable
-rw-r--r-- | db/migrate/20140307023534_create_user_team_join_table.rb | 8 | ||||
-rw-r--r-- | db/migrate/20140307045916_create_servers.rb (renamed from db/migrate/20140307023418_create_servers.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307045922_create_matches.rb (renamed from db/migrate/20140307023423_create_matches.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307045927_create_teams.rb (renamed from db/migrate/20140307023428_create_teams.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307045934_create_alerts.rb (renamed from db/migrate/20140307023433_create_alerts.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307045941_create_pms.rb (renamed from db/migrate/20140307023438_create_pms.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307045948_create_tournaments.rb (renamed from db/migrate/20140307023443_create_tournaments.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307045954_create_games.rb (renamed from db/migrate/20140307023448_create_games.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307050001_create_users.rb (renamed from db/migrate/20140307023453_create_users.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307050008_create_sessions.rb (renamed from db/migrate/20140307023459_create_sessions.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307050016_create_server_settings.rb (renamed from db/migrate/20140307023504_create_server_settings.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307050023_create_tournament_options.rb (renamed from db/migrate/20140307023509_create_tournament_options.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307050029_create_game_options.rb (renamed from db/migrate/20140307023514_create_game_options.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307050035_create_scores.rb (renamed from db/migrate/20140307023519_create_scores.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307050041_create_tournament_players_join_table.rb (renamed from db/migrate/20140307023524_create_tournament_players_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307050046_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140307023529_create_tournament_hosts_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307050052_create_team_user_join_table.rb | 8 | ||||
-rw-r--r-- | db/migrate/20140307050059_create_match_team_join_table.rb (renamed from db/migrate/20140307023538_create_match_team_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140307050124_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140307023557_add_hidden_attrs_to_user.rb) | 0 | ||||
-rw-r--r-- | db/schema.rb | 12 | ||||
-rwxr-xr-x | generate.sh | 2 |
21 files changed, 15 insertions, 15 deletions
diff --git a/db/migrate/20140307023534_create_user_team_join_table.rb b/db/migrate/20140307023534_create_user_team_join_table.rb deleted file mode 100644 index 7b4d17f..0000000 --- a/db/migrate/20140307023534_create_user_team_join_table.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateUserTeamJoinTable < ActiveRecord::Migration - def change - create_join_table :users, :matches do |t| - # t.index [:user_id, :match_id] - # t.index [:match_id, :user_id] - end - end -end diff --git a/db/migrate/20140307023418_create_servers.rb b/db/migrate/20140307045916_create_servers.rb index f33241a..f33241a 100644 --- a/db/migrate/20140307023418_create_servers.rb +++ b/db/migrate/20140307045916_create_servers.rb diff --git a/db/migrate/20140307023423_create_matches.rb b/db/migrate/20140307045922_create_matches.rb index 325863d..325863d 100644 --- a/db/migrate/20140307023423_create_matches.rb +++ b/db/migrate/20140307045922_create_matches.rb diff --git a/db/migrate/20140307023428_create_teams.rb b/db/migrate/20140307045927_create_teams.rb index fdf9a68..fdf9a68 100644 --- a/db/migrate/20140307023428_create_teams.rb +++ b/db/migrate/20140307045927_create_teams.rb diff --git a/db/migrate/20140307023433_create_alerts.rb b/db/migrate/20140307045934_create_alerts.rb index 68a8e10..68a8e10 100644 --- a/db/migrate/20140307023433_create_alerts.rb +++ b/db/migrate/20140307045934_create_alerts.rb diff --git a/db/migrate/20140307023438_create_pms.rb b/db/migrate/20140307045941_create_pms.rb index 93bb5c6..93bb5c6 100644 --- a/db/migrate/20140307023438_create_pms.rb +++ b/db/migrate/20140307045941_create_pms.rb diff --git a/db/migrate/20140307023443_create_tournaments.rb b/db/migrate/20140307045948_create_tournaments.rb index 545e603..545e603 100644 --- a/db/migrate/20140307023443_create_tournaments.rb +++ b/db/migrate/20140307045948_create_tournaments.rb diff --git a/db/migrate/20140307023448_create_games.rb b/db/migrate/20140307045954_create_games.rb index 5e4f56f..5e4f56f 100644 --- a/db/migrate/20140307023448_create_games.rb +++ b/db/migrate/20140307045954_create_games.rb diff --git a/db/migrate/20140307023453_create_users.rb b/db/migrate/20140307050001_create_users.rb index 8032870..8032870 100644 --- a/db/migrate/20140307023453_create_users.rb +++ b/db/migrate/20140307050001_create_users.rb diff --git a/db/migrate/20140307023459_create_sessions.rb b/db/migrate/20140307050008_create_sessions.rb index fe25bf2..fe25bf2 100644 --- a/db/migrate/20140307023459_create_sessions.rb +++ b/db/migrate/20140307050008_create_sessions.rb diff --git a/db/migrate/20140307023504_create_server_settings.rb b/db/migrate/20140307050016_create_server_settings.rb index dfdd91b..dfdd91b 100644 --- a/db/migrate/20140307023504_create_server_settings.rb +++ b/db/migrate/20140307050016_create_server_settings.rb diff --git a/db/migrate/20140307023509_create_tournament_options.rb b/db/migrate/20140307050023_create_tournament_options.rb index 53b601c..53b601c 100644 --- a/db/migrate/20140307023509_create_tournament_options.rb +++ b/db/migrate/20140307050023_create_tournament_options.rb diff --git a/db/migrate/20140307023514_create_game_options.rb b/db/migrate/20140307050029_create_game_options.rb index 2f62ef7..2f62ef7 100644 --- a/db/migrate/20140307023514_create_game_options.rb +++ b/db/migrate/20140307050029_create_game_options.rb diff --git a/db/migrate/20140307023519_create_scores.rb b/db/migrate/20140307050035_create_scores.rb index 4ca0b0b..4ca0b0b 100644 --- a/db/migrate/20140307023519_create_scores.rb +++ b/db/migrate/20140307050035_create_scores.rb diff --git a/db/migrate/20140307023524_create_tournament_players_join_table.rb b/db/migrate/20140307050041_create_tournament_players_join_table.rb index be240e8..be240e8 100644 --- a/db/migrate/20140307023524_create_tournament_players_join_table.rb +++ b/db/migrate/20140307050041_create_tournament_players_join_table.rb diff --git a/db/migrate/20140307023529_create_tournament_hosts_join_table.rb b/db/migrate/20140307050046_create_tournament_hosts_join_table.rb index 7521d89..7521d89 100644 --- a/db/migrate/20140307023529_create_tournament_hosts_join_table.rb +++ b/db/migrate/20140307050046_create_tournament_hosts_join_table.rb diff --git a/db/migrate/20140307050052_create_team_user_join_table.rb b/db/migrate/20140307050052_create_team_user_join_table.rb new file mode 100644 index 0000000..f3b57fc --- /dev/null +++ b/db/migrate/20140307050052_create_team_user_join_table.rb @@ -0,0 +1,8 @@ +class CreateTeamUserJoinTable < ActiveRecord::Migration + def change + create_join_table :teams, :users do |t| + # t.index [:team_id, :user_id] + # t.index [:user_id, :team_id] + end + end +end diff --git a/db/migrate/20140307023538_create_match_team_join_table.rb b/db/migrate/20140307050059_create_match_team_join_table.rb index c2ed1b7..c2ed1b7 100644 --- a/db/migrate/20140307023538_create_match_team_join_table.rb +++ b/db/migrate/20140307050059_create_match_team_join_table.rb diff --git a/db/migrate/20140307023557_add_hidden_attrs_to_user.rb b/db/migrate/20140307050124_add_hidden_attrs_to_user.rb index 2f1b0b2..2f1b0b2 100644 --- a/db/migrate/20140307023557_add_hidden_attrs_to_user.rb +++ b/db/migrate/20140307050124_add_hidden_attrs_to_user.rb diff --git a/db/schema.rb b/db/schema.rb index 16789fb..c9c0fa6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140307023557) do +ActiveRecord::Schema.define(version: 20140307050124) do create_table "alerts", force: true do |t| t.integer "author_id" @@ -61,11 +61,6 @@ ActiveRecord::Schema.define(version: 20140307023557) do t.integer "team_id", null: false end - create_table "matches_users", id: false, force: true do |t| - t.integer "user_id", null: false - t.integer "match_id", null: false - end - create_table "players_tournaments", id: false, force: true do |t| t.integer "player_id", null: false t.integer "tournament_id", null: false @@ -119,6 +114,11 @@ ActiveRecord::Schema.define(version: 20140307023557) do add_index "teams", ["match_id"], name: "index_teams_on_match_id" + create_table "teams_users", id: false, force: true do |t| + t.integer "team_id", null: false + t.integer "user_id", null: false + end + create_table "tournament_options", force: true do |t| t.integer "tournament_id" t.integer "vartype" diff --git a/generate.sh b/generate.sh index 03225e7..739c195 100755 --- a/generate.sh +++ b/generate.sh @@ -43,7 +43,7 @@ bundle exec rails generate model score user:references match:references value:in # Join tables bundle exec rails generate migration CreateTournamentPlayersJoinTable players tournaments bundle exec rails generate migration CreateTournamentHostsJoinTable hosts tournaments -bundle exec rails generate migration CreateUserTeamJoinTable users matches +bundle exec rails generate migration CreateTeamUserJoinTable teams users bundle exec rails generate migration CreateMatchTeamJoinTable matches teams # Just controllers |