mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-14 11:25:02 +02:00
Fix library query sort by title, add indexes for books and libraryItems
This commit is contained in:
parent
8c9fc3ddb5
commit
aac2879652
3 changed files with 40 additions and 3 deletions
|
@ -151,7 +151,27 @@ module.exports = (sequelize) => {
|
|||
genres: DataTypes.JSON
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'book'
|
||||
modelName: 'book',
|
||||
indexes: [
|
||||
{
|
||||
fields: [{
|
||||
name: 'title',
|
||||
collate: 'NOCASE'
|
||||
}]
|
||||
},
|
||||
{
|
||||
fields: [{
|
||||
name: 'titleIgnorePrefix',
|
||||
collate: 'NOCASE'
|
||||
}]
|
||||
},
|
||||
{
|
||||
fields: ['publishedYear']
|
||||
},
|
||||
{
|
||||
fields: ['duration']
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
return Book
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue