Create index to speed up Fever API calls
This commit is contained in:
parent
cc281f3533
commit
e97ebfd8c2
3 changed files with 4 additions and 1 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
"miniflux.app/logger"
|
||||
)
|
||||
|
||||
const schemaVersion = 33
|
||||
const schemaVersion = 34
|
||||
|
||||
// Migrate executes database migrations.
|
||||
func Migrate(db *sql.DB) {
|
||||
|
|
|
@ -186,6 +186,7 @@ create index entries_user_feed_idx on entries (user_id, feed_id);
|
|||
"schema_version_32": `alter table users add column entries_per_page int default 100;
|
||||
`,
|
||||
"schema_version_33": `alter table users add column show_reading_time boolean default 't';`,
|
||||
"schema_version_34": `CREATE INDEX entries_id_user_status_idx ON entries USING btree (id, user_id, status);`,
|
||||
"schema_version_4": `create type entry_sorting_direction as enum('asc', 'desc');
|
||||
alter table users add column entry_direction entry_sorting_direction default 'asc';
|
||||
`,
|
||||
|
@ -242,6 +243,7 @@ var SqlMapChecksums = map[string]string{
|
|||
"schema_version_31": "9290ef295731b03ddfe32dcaded0be70d41b63572420ad379cf2874a9b54581c",
|
||||
"schema_version_32": "5b4de8dd2d7e3c6ae4150e0e3931df2ee989f2c667145bd67294e5a5f3fae456",
|
||||
"schema_version_33": "bf38514efeb6c12511f41b1cc484f92722240b0a6ae874c32a958dfea3433d02",
|
||||
"schema_version_34": "1a3e036f652fc98b7564a27013f04e1eb36dd0d68893c723168f134dc1065822",
|
||||
"schema_version_4": "216ea3a7d3e1704e40c797b5dc47456517c27dbb6ca98bf88812f4f63d74b5d9",
|
||||
"schema_version_5": "46397e2f5f2c82116786127e9f6a403e975b14d2ca7b652a48cd1ba843e6a27c",
|
||||
"schema_version_6": "9d05b4fb223f0e60efc716add5048b0ca9c37511cf2041721e20505d6d798ce4",
|
||||
|
|
1
database/sql/schema_version_34.sql
Normal file
1
database/sql/schema_version_34.sql
Normal file
|
@ -0,0 +1 @@
|
|||
CREATE INDEX entries_id_user_status_idx ON entries USING btree (id, user_id, status);
|
Loading…
Reference in a new issue