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:
authorCSammy <github@csammy.net>2018-12-28 03:01:52 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2018-12-28 03:39:49 +0300
commita21cde4c0066f9a5338ba8fb906d979642a05333 (patch)
tree2b0f4cf566fb2aef39d4e46f729dfa39a85fad12 /db
parent5a0381f832f6caac8170e69a1c6faf988f6835d9 (diff)
Speed up public stream and remove obsolete indexes
closes #7944
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20181227235201_clean_up_posts_indexes.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20181227235201_clean_up_posts_indexes.rb b/db/migrate/20181227235201_clean_up_posts_indexes.rb
new file mode 100644
index 000000000..268282155
--- /dev/null
+++ b/db/migrate/20181227235201_clean_up_posts_indexes.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class CleanUpPostsIndexes < ActiveRecord::Migration[5.1]
+ def change
+ remove_index :posts, %i[id type created_at]
+ remove_index :posts, :tweet_id
+ add_index :posts, %i[created_at id]
+ end
+end