Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorRaphael Sofaer <raphael@joindiaspora.com>2011-07-08 02:14:29 +0400
committerRaphael Sofaer <raphael@joindiaspora.com>2011-07-08 02:14:29 +0400
commite98cc4b9605987862ff5ae90df7bdfd62a577baa (patch)
treeb66ad497ec07723d426d6214a6a969724e5d96db /db
parentd0ce2571076bfdee3a414c39dacbdc173e872724 (diff)
Sort on and index taggings, ftw
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20110707221112_index_taggings_created_at.rb8
-rw-r--r--db/schema.rb3
2 files changed, 10 insertions, 1 deletions
diff --git a/db/migrate/20110707221112_index_taggings_created_at.rb b/db/migrate/20110707221112_index_taggings_created_at.rb
new file mode 100644
index 000000000..136d72d44
--- /dev/null
+++ b/db/migrate/20110707221112_index_taggings_created_at.rb
@@ -0,0 +1,8 @@
+class IndexTaggingsCreatedAt < ActiveRecord::Migration
+ def self.up
+ add_index :taggings, :created_at
+ end
+
+ def self.down
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index a6d58dfb0..536e3167e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20110705003445) do
+ActiveRecord::Schema.define(:version => 20110707221112) do
create_table "aspect_memberships", :force => true do |t|
t.integer "aspect_id", :null => false
@@ -343,6 +343,7 @@ ActiveRecord::Schema.define(:version => 20110705003445) do
t.datetime "created_at"
end
+ add_index "taggings", ["created_at"], :name => "index_taggings_on_created_at"
add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
add_index "taggings", ["taggable_id", "taggable_type", "tag_id"], :name => "index_taggings_uniquely", :unique => true