Added database indexes. Performance boost for balance page.
Conflicts: db/schema.rb
This commit is contained in:
parent
524d9b7c7a
commit
7b7d50a235
2 changed files with 13 additions and 0 deletions
11
db/migrate/20120512211613_add_order_indexes.rb
Normal file
11
db/migrate/20120512211613_add_order_indexes.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class AddOrderIndexes < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :group_order_articles, :group_order_id
|
||||
add_index :group_order_articles, :order_article_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :group_order_articles, :group_order_id
|
||||
remove_index :group_order_articles, :order_article_id
|
||||
end
|
||||
end
|
|
@ -114,6 +114,8 @@ ActiveRecord::Schema.define(:version => 20120622094337) do
|
|||
end
|
||||
|
||||
add_index "group_order_articles", ["group_order_id", "order_article_id"], :name => "goa_index", :unique => true
|
||||
add_index "group_order_articles", ["group_order_id"], :name => "index_group_order_articles_on_group_order_id"
|
||||
add_index "group_order_articles", ["order_article_id"], :name => "index_group_order_articles_on_order_article_id"
|
||||
|
||||
create_table "group_orders", :force => true do |t|
|
||||
t.integer "ordergroup_id", :default => 0, :null => false
|
||||
|
|
Loading…
Reference in a new issue