mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Fix v2.17.0 migration to ensure mediaItemShares table exists
This commit is contained in:
parent
b148a57c98
commit
ff026a06bb
@ -27,10 +27,14 @@ async function up({ context: { queryInterface, logger } }) {
|
|||||||
type: 'UUID'
|
type: 'UUID'
|
||||||
})
|
})
|
||||||
|
|
||||||
logger.info('[2.17.0 migration] Changing mediaItemShares.mediaItemId column to UUID')
|
if (await queryInterface.tableExists('mediaItemShares')) {
|
||||||
await queryInterface.changeColumn('mediaItemShares', 'mediaItemId', {
|
logger.info('[2.17.0 migration] Changing mediaItemShares.mediaItemId column to UUID')
|
||||||
type: 'UUID'
|
await queryInterface.changeColumn('mediaItemShares', 'mediaItemId', {
|
||||||
})
|
type: 'UUID'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
logger.info('[2.17.0 migration] mediaItemShares table does not exist, skipping column change')
|
||||||
|
}
|
||||||
|
|
||||||
logger.info('[2.17.0 migration] Changing playbackSessions.mediaItemId column to UUID')
|
logger.info('[2.17.0 migration] Changing playbackSessions.mediaItemId column to UUID')
|
||||||
await queryInterface.changeColumn('playbackSessions', 'mediaItemId', {
|
await queryInterface.changeColumn('playbackSessions', 'mediaItemId', {
|
||||||
|
Loading…
Reference in New Issue
Block a user