Repository navigation
BookStorage v5.7.0 — PostgreSQL, migration admin, and DB-safe maintenance
This minor release focuses on optional PostgreSQL as a production database, a safer SQLite → PostgreSQL migration path from the admin UI, and clearer behaviour when the database is temporarily unreachable.
Database & migration
- PostgreSQL support alongside SQLite: schema, FTS, CI integration, and
BOOKSTORAGE_POSTGRES_URLconfiguration. - Admin → PostgreSQL migration wizard (superadmin): test connection, copy data, verify row counts, then write
.envonly after a successful copy (avoids locking users out if migration or.envwrite fails). API errors include adetailfield where applicable. lib/pqcompatibility: normalize or defaultsslmode(e.g.prefer→disableon LAN); documentation forpg_hba/hostnosslwhen usingsslmode=disable.- SQLite migration 9 runs outside a transaction where required for foreign keys.
Operations & deploy
deploy/setup-postgres-vm.sh: more reliableapt(timeouts, optional IPv4, HTTP watchdog, optional verbose HTTP), better handling when PostgreSQL runs aspostgresql@version-cluster, LAN IP hints in generated URLs, English operator messages.deploy/README-postgres-vm.md: English self-hosting guide for the Postgres VM flow.deploy/install.sh:.envownership set to the service user (nobodyby default) so the migration step can updateBOOKSTORAGE_POSTGRES_URLwithout permission errors.- Docs (
docs/self-hosting.md,docs/fr/hebergement.md,.env.example): Postgres migration,.envpermissions troubleshooting,BSCTL_UPDATE_TAGexamples updated to v5.7.0.
Product & resilience
- Google OAuth sign-in and account linking (when
BOOKSTORAGE_PUBLIC_ORIGINand Google client env vars are set). - 503 maintenance page when the app cannot reach the database;
/api/*returns JSONservice_unavailablewithreason: database./healthz,/metrics, and/static/stay available for probes and assets. - Browser-side: wrap
fetchon DB-related 503 responses and poll/healthzso open tabs react without a manual full refresh; server-side DB probe runs on every request (no stale “DB OK” cache after an outage).
Admin UI
- PostgreSQL migration tab on all admin pages (when eligible); custom confirm modal for migration instead of the native
confirm()dialog.
Release workflow
The push-release Cursor skill in this repo can bump APP_VERSION, run local checks, create an annotated tag, push, and publish a GitHub release with structured notes—use it for the next release without filling the web form by hand.
Full changelog: v5.6.2...v5.7.0