Add index for recently added SQL query

pull/2356/head
Chocobozzz 2019-12-23 11:55:51 +01:00
parent 0dfee3a3ac
commit 611a72ae15
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 6 additions and 1 deletions

View File

@ -149,7 +149,12 @@ const indexes: (ModelIndexesOptions & { where?: WhereOptions })[] = [
buildTrigramSearchIndex('video_name_trigram', 'name'),
{ fields: [ 'createdAt' ] },
{ fields: [ 'publishedAt' ] },
{
fields: [
{ name: 'publishedAt', order: 'DESC' },
{ name: 'id', order: 'ASC' }
]
},
{ fields: [ 'duration' ] },
{ fields: [ 'views' ] },
{ fields: [ 'channelId' ] },