Skip to content

Commit

Permalink
cover-updater: Include entries with position starting with "p"; possi…
Browse files Browse the repository at this point in the history
…bly fix script
  • Loading branch information
bperel committed Dec 31, 2024
1 parent 379e46f commit 8c92b1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/cover-updater/scripts/import-covers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ COVER_LIST_EXPORT_FILE=/home/covers.csv
echo "Exporting covers from the COA database..."
mysql -h ${MYSQL_COA_HOST} -uroot -p${MYSQL_ROOT_PASSWORD} ${MYSQL_COA_DATABASE} </home/scripts/sql/get-coa-covers.sql | sed 's/\t/,/g' >${COVER_LIST_EXPORT_FILE} &&
echo "Importing covers into the covers database..." &&
mysql -uroot -p${MYSQL_ROOT_PASSWORD} -h ${MYSQL_COVER_INFO_HOST} --local-infile=1 ${MYSQL_COVER_INFO_DATABASE} -e "LOAD DATA LOCAL INFILE \"${COVER_LIST_EXPORT_FILE}\" IGNORE INTO TABLE covers FIELDS TERMINATED BY ',' IGNORE 1 LINES (issuecode,sitecode,url);"
mysql -uroot -p${MYSQL_ROOT_PASSWORD} -h ${MYSQL_COVER_INFO_HOST} --local-infile=1 ${MYSQL_COVER_INFO_DATABASE} -e "LOAD DATA LOCAL INFILE \"${COVER_LIST_EXPORT_FILE}\" IGNORE INTO TABLE covers FIELDS TERMINATED BY ',' IGNORE 1 LINES (issuecode,sitecode,url)"
2 changes: 1 addition & 1 deletion apps/cover-updater/scripts/sql/get-coa-covers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
(
SELECT MIN(position)
FROM inducks_entry e
WHERE entry.issuecode = e.issuecode AND position NOT LIKE 'p%'
WHERE entry.issuecode = e.issuecode
GROUP BY e.issuecode
)
AND issuecode != '';

0 comments on commit 8c92b1e

Please sign in to comment.