Browse files

Added some missing indexes.

  • Loading branch information...
1 parent 71270b4 commit 1716a7e245b578ef39442aec06bce53b0c4a6e7c @larssg committed Apr 14, 2011
View
9 db/migrate/20110414081307_add_index_on_memberships_team_id.rb
@@ -0,0 +1,9 @@
+class AddIndexOnMembershipsTeamId < ActiveRecord::Migration
+ def self.up
+ add_index :memberships, :team_id
+ end
+
+ def self.down
+ remove_index :memberships, :team_id
+ end
+end
View
9 db/migrate/20110414081434_add_index_on_teams_match_id.rb
@@ -0,0 +1,9 @@
+class AddIndexOnTeamsMatchId < ActiveRecord::Migration
+ def self.up
+ add_index :teams, :match_id
+ end
+
+ def self.down
+ remove_index :teams, :match_id
+ end
+end
View
4 db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20110414081016) do
+ActiveRecord::Schema.define(:version => 20110414081434) do
create_table "accounts", :force => true do |t|
t.string "name"
@@ -111,6 +111,7 @@
add_index "memberships", ["game_id"], :name => "index_memberships_on_game_id"
add_index "memberships", ["game_participation_id"], :name => "index_memberships_on_game_participation_id"
+ add_index "memberships", ["team_id"], :name => "index_memberships_on_team_id"
add_index "memberships", ["user_id"], :name => "index_memberships_on_person_id"
create_table "news_items", :force => true do |t|
@@ -135,6 +136,7 @@
end
add_index "teams", ["account_id"], :name => "index_teams_on_account_id"
+ add_index "teams", ["match_id"], :name => "index_teams_on_match_id"
add_index "teams", ["opponent_ids"], :name => "index_teams_on_opponent_ids"
add_index "teams", ["team_ids"], :name => "index_teams_on_team_ids"

0 comments on commit 1716a7e

Please sign in to comment.