Commit 8dec24a33ca35cbd9daa6ba38df4fe1e1f9eb2ee

Authored by Dmitriy Zaporozhets
1 parent 05820516

Event indices related to #2159

db/migrate/20121203154450_add_events_indices.rb 0 → 100644
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
  1 +class AddEventsIndices < ActiveRecord::Migration
  2 + def change
  3 + add_index :events, :project_id
  4 + add_index :events, :author_id
  5 + add_index :events, :action
  6 + add_index :events, :target_type
  7 + end
  8 +end
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 # 11 #
12 # It's strongly recommended to check this file into your version control system. 12 # It's strongly recommended to check this file into your version control system.
13 13
14 -ActiveRecord::Schema.define(:version => 20121123164910) do 14 +ActiveRecord::Schema.define(:version => 20121203154450) do
15 15
16 create_table "events", :force => true do |t| 16 create_table "events", :force => true do |t|
17 t.string "target_type" 17 t.string "target_type"
@@ -25,6 +25,11 @@ ActiveRecord::Schema.define(:version =&gt; 20121123164910) do @@ -25,6 +25,11 @@ ActiveRecord::Schema.define(:version =&gt; 20121123164910) do
25 t.integer "author_id" 25 t.integer "author_id"
26 end 26 end
27 27
  28 + add_index "events", ["action"], :name => "index_events_on_action"
  29 + add_index "events", ["author_id"], :name => "index_events_on_author_id"
  30 + add_index "events", ["project_id"], :name => "index_events_on_project_id"
  31 + add_index "events", ["target_type"], :name => "index_events_on_target_type"
  32 +
28 create_table "issues", :force => true do |t| 33 create_table "issues", :force => true do |t|
29 t.string "title" 34 t.string "title"
30 t.integer "assignee_id" 35 t.integer "assignee_id"