mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-03 00:06:46 +01:00
Clean up unused parts of statement
This commit is contained in:
parent
8b95dd65d9
commit
66b290577c
@ -1,5 +1,3 @@
|
||||
const Logger = require('../Logger')
|
||||
|
||||
/**
|
||||
* @typedef MigrationContext
|
||||
* @property {import('sequelize').QueryInterface} queryInterface - a suquelize QueryInterface object.
|
||||
@ -30,7 +28,7 @@ async function up({ context: { queryInterface, logger } }) {
|
||||
|
||||
// Use the queryInterface to get the series table and find duplicates in the `name` and `libraryId` column
|
||||
const [duplicates] = await queryInterface.sequelize.query(`
|
||||
SELECT name, libraryId, MAX(updatedAt) AS latestUpdatedAt, COUNT(name) AS count
|
||||
SELECT name, libraryId
|
||||
FROM Series
|
||||
GROUP BY name, libraryId
|
||||
HAVING COUNT(name) > 1
|
||||
@ -47,7 +45,7 @@ async function up({ context: { queryInterface, logger } }) {
|
||||
// Determine any duplicate book IDs in the `bookSeries` table for the same series
|
||||
const [duplicateBookIds] = await queryInterface.sequelize.query(
|
||||
`
|
||||
SELECT bookId, COUNT(bookId) AS count
|
||||
SELECT bookId
|
||||
FROM BookSeries
|
||||
WHERE seriesId IN (
|
||||
SELECT id
|
||||
|
Loading…
Reference in New Issue
Block a user