mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
Complete migration file
This commit is contained in:
parent
b8de041497
commit
243bc7b0d0
22 changed files with 1203 additions and 162 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue