mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-10 14:52:51 +02:00
Add feed migration and cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user