mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 04:40:09 +00:00
5b4aa3fa15
Track and run run-once SQL data migrations: entrypoint now checks _data_migrations before executing each prisma data-migration file, records successful runs, and skips already-applied scripts. Adds a Prisma DataMigration model mapped to _data_migrations and a new reset-works-table.sql migration to clear work tables for a dedup rebuild. Also improves dedup logic: extractSubtitle and subtitle-compatibility checks are added so series entries like "Series: Book A" vs "Series: Book B" are not collapsed, with accompanying unit tests for extraction and behavior.
8 lines
388 B
SQL
8 lines
388 B
SQL
-- Reset works table to fix incorrect dedup groupings (v1.1.2)
|
|
-- Books with "Series: Title" naming (e.g. "Eden's Gate: The Reborn" vs
|
|
-- "Eden's Gate: The Spartan") were incorrectly merged into the same work
|
|
-- because subtitle stripping collapsed them to the same base title.
|
|
-- The works table auto-rebuilds from dedup logic as users browse.
|
|
DELETE FROM work_asins;
|
|
DELETE FROM works;
|