Prepare for migration

This commit is contained in:
Tiberiu Ichim 2026-02-05 16:42:47 +02:00
parent dedfdba39b
commit d442b46d7e
11 changed files with 451 additions and 0 deletions

13
scripts/dump_books.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
# Dump books table cover paths
DB_PATH="/mnt/docker/work/books/audiobookshelf/config/absdatabase.sqlite"
echo "=== books.coverPath ==="
echo "ID | COVER_PATH"
echo "---|-----------"
sqlite3 -header -column "$DB_PATH" "SELECT id, coverPath FROM books LIMIT 50;"
echo ""
echo "=== Unique Cover Path Prefixes ==="
sqlite3 "$DB_PATH" "SELECT DISTINCT SUBSTR(coverPath, 1, INSTR(coverPath || '/', '/') - 1) FROM books WHERE coverPath IS NOT NULL;" | sort -u