mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 18:01:42 +00:00
Revert "add database changes for recommandation sent and inbox"
This reverts commit ae4bd94b38.
This commit is contained in:
parent
61af837cf5
commit
7e6b7bc9f6
1 changed files with 2 additions and 20 deletions
|
|
@ -161,12 +161,7 @@ class Database {
|
|||
get deviceModel() {
|
||||
return this.models.device
|
||||
}
|
||||
get recommendationTagModel() {
|
||||
return this.models.recommendationTag
|
||||
}
|
||||
get bookRecommendationModel() {
|
||||
return this.models.bookRecommendation
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if db file exists
|
||||
* @returns {boolean}
|
||||
|
|
@ -350,21 +345,8 @@ class Database {
|
|||
require('./models/Setting').init(this.sequelize)
|
||||
require('./models/CustomMetadataProvider').init(this.sequelize)
|
||||
require('./models/MediaItemShare').init(this.sequelize)
|
||||
require('./models/RecommendationTag').init(this.sequelize)
|
||||
require('./models/BookRecommendation').init(this.sequelize)
|
||||
// One-time association pass (no swallowing of errors)
|
||||
const models = this.sequelize.models
|
||||
Object.values(models).forEach((m) => {
|
||||
if (typeof m?.associate === 'function') m.associate(models)
|
||||
})
|
||||
|
||||
return this.sequelize.sync({ force, alter: false })
|
||||
// single association pass
|
||||
Object.values(this.sequelize.models).forEach((m) => {
|
||||
if (m?.associate)
|
||||
try {
|
||||
m.associate(this.sequelize.models)
|
||||
} catch (_) {}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue