Add database schema and migration system
Implement a migration runner that tracks applied migrations in a `migrations` table and applies numbered SQL files from scripts/backend/migrations/ in order, wrapped in transactions. Create the initial schema (001_initial.sql) with tables for books, series, book_subgenres, book_sources, fetch_runs, and search_cursors. `npm run db:migrate` creates the database and applies pending migrations idempotently. A getMigrationVersion() helper exposes the current version. Closes #23 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Parent521d101
3 files changed+160-6
StackedSplit