mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-08 10:21:38 +00:00
add postgres dialect support for homelab migration
This commit is contained in:
parent
fa5fa7b788
commit
453cd2587b
20 changed files with 851 additions and 159 deletions
|
|
@ -128,6 +128,8 @@ class Author extends Model {
|
|||
* @param {import('../Database').sequelize} sequelize
|
||||
*/
|
||||
static init(sequelize) {
|
||||
const nameIndexField = sequelize.getDialect() === 'postgres' ? 'name' : { name: 'name', collate: 'NOCASE' }
|
||||
|
||||
super.init(
|
||||
{
|
||||
id: {
|
||||
|
|
@ -146,12 +148,7 @@ class Author extends Model {
|
|||
modelName: 'author',
|
||||
indexes: [
|
||||
{
|
||||
fields: [
|
||||
{
|
||||
name: 'name',
|
||||
collate: 'NOCASE'
|
||||
}
|
||||
]
|
||||
fields: [nameIndexField]
|
||||
},
|
||||
// {
|
||||
// fields: [{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue