mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-03 01:35:08 +02:00
Add feed migration and cleanup
This commit is contained in:
parent
a4b0f6c202
commit
a0bc959850
12 changed files with 138 additions and 34 deletions
|
@ -52,8 +52,6 @@ module.exports = (sequelize) => {
|
|||
enclosureSize: oldEpisode.enclosure?.length || null,
|
||||
enclosureType: oldEpisode.enclosure?.type || null,
|
||||
publishedAt: oldEpisode.publishedAt,
|
||||
createdAt: oldEpisode.addedAt,
|
||||
updatedAt: oldEpisode.updatedAt,
|
||||
podcastId: oldEpisode.podcastId,
|
||||
audioFile: oldEpisode.audioFile?.toJSON() || null,
|
||||
chapters: oldEpisode.chapters
|
||||
|
@ -88,7 +86,9 @@ module.exports = (sequelize) => {
|
|||
})
|
||||
|
||||
const { podcast } = sequelize.models
|
||||
podcast.hasMany(PodcastEpisode)
|
||||
podcast.hasMany(PodcastEpisode, {
|
||||
onDelete: 'CASCADE'
|
||||
})
|
||||
PodcastEpisode.belongsTo(podcast)
|
||||
|
||||
return PodcastEpisode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue