Skip to content

Commit a21cde4

Browse files
CSammySuperTux88
authored andcommitted
Speed up public stream and remove obsolete indexes
closes diaspora#7944
1 parent 5a0381f commit a21cde4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 0.7.9.0
22

33
## Refactor
4+
* Improve public stream performance and cleanup unused indexes [#7944](https://github.com/diaspora/diaspora/pull/7944)
45

56
## Bug fixes
67

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
class CleanUpPostsIndexes < ActiveRecord::Migration[5.1]
4+
def change
5+
remove_index :posts, %i[id type created_at]
6+
remove_index :posts, :tweet_id
7+
add_index :posts, %i[created_at id]
8+
end
9+
end

0 commit comments

Comments
 (0)