Fixed actor unique index preventing multiple actors with the same slug on a different network. Changed scene delete query to be able to handle more scene IDs.
This commit is contained in:
@@ -146,12 +146,13 @@ async function deleteScenes(sceneIds) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// there can be too many scene IDs for where in, causing a stack depth error
|
||||
await knex('movies_scenes')
|
||||
.whereIn('scene_id', sceneIds)
|
||||
.whereRaw('scene_id = ANY(:sceneIds)', { sceneIds })
|
||||
.delete();
|
||||
|
||||
const deleteCount = await knex('releases')
|
||||
.whereIn('id', sceneIds)
|
||||
.whereRaw('id = ANY(:sceneIds)', { sceneIds })
|
||||
.delete();
|
||||
|
||||
logger.info(`Removed ${deleteCount}/${sceneIds.length} scenes`);
|
||||
|
||||
Reference in New Issue
Block a user