mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-05 10:12:44 +02:00
Complete migration file
This commit is contained in:
@@ -30,8 +30,8 @@ module.exports = (sequelize) => {
|
||||
LibraryItem.hasOne(Book)
|
||||
Book.belongsTo(LibraryItem)
|
||||
|
||||
FileMetadata.hasOne(Book)
|
||||
Book.belongsTo(FileMetadata, { as: 'ImageFile' }) // Ref: https://sequelize.org/docs/v6/core-concepts/assocs/#defining-an-alias
|
||||
FileMetadata.hasOne(Book, { foreignKey: 'ImageFileId ' })
|
||||
Book.belongsTo(FileMetadata, { as: 'ImageFile', foreignKey: 'ImageFileId' }) // Ref: https://sequelize.org/docs/v6/core-concepts/assocs/#defining-an-alias
|
||||
|
||||
EBookFile.hasOne(Book)
|
||||
Book.belongsTo(EBookFile)
|
||||
|
||||
Reference in New Issue
Block a user