mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-28 21:19:42 +00:00
Complete migration file
This commit is contained in:
parent
b8de041497
commit
243bc7b0d0
22 changed files with 1203 additions and 162 deletions
|
|
@ -19,8 +19,8 @@ module.exports = (sequelize) => {
|
|||
})
|
||||
|
||||
const { FileMetadata } = sequelize.models
|
||||
FileMetadata.hasMany(Person)
|
||||
Person.belongsTo(FileMetadata, { as: 'ImageFile' }) // Ref: https://sequelize.org/docs/v6/core-concepts/assocs/#defining-an-alias
|
||||
FileMetadata.hasMany(Person, { foreignKey: 'ImageFileId' })
|
||||
Person.belongsTo(FileMetadata, { as: 'ImageFile', foreignKey: 'ImageFileId' }) // Ref: https://sequelize.org/docs/v6/core-concepts/assocs/#defining-an-alias
|
||||
|
||||
return Person
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue