Skip to content

Feat/postgres migration - #148

Merged
Gsync merged 14 commits into
devfrom
feat/postgres-migration
Oct 19, 2026
Merged

Gsync merged 14 commits into
devfrom
feat/postgres-migration

Conversation

@Gsync

@Gsync Gsync commented Oct 18, 2026

Copy link
Copy Markdown
Owner

No description provided.

Gsync and others added 14 commits October 13, 2026 08:23
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… retire the SQLite migration history and make the real-engine backup round-trip test opt-in

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d lists tie-broken and resume entries ordered on Postgres

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…build config and the import ordering and sanitising modules

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…hestration and entry point

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e auto-create and credential-safe failure messages

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…h wait-for-db and the one-time import, build both Prisma clients into the image and guard deploys against a locally edited compose file

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tance

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ase, pick the backup and restore target from DATABASE_URL and make BUNDLED_DB optional

- resolve-db-url runs first in the entrypoint: an unset DATABASE_URL or a
  leftover file: one resolves to BUNDLED_DATABASE_URL, the latter with a
  one-line warning, so upgrading never needs an .env edit
- compose passes DATABASE_URL as found plus BUNDLED_DATABASE_URL and BUNDLED_DB
- the file: stop now applies only with BUNDLED_DB=0 and says so
- backup-db.sh and restore-db.sh choose external mode from DATABASE_URL, so
  an external operator without BUNDLED_DB=0 no longer dumps the empty bundled db
- .env.example marks BUNDLED_DB=0 as optional

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…date contributor setup, fix the README backup link and reword SQLite-era comments

- wiki/upgrading-to-postgres.md: the operator upgrade guide, linked from the
  wiki index and from a new "whole instance" question in wiki/backup.md
- README: configuration lives in .env, a DATABASE_URL row, an upgrade note,
  Postgres in the stack, and the Data Backup link now points at wiki/Backup
- CONTRIBUTING: Postgres 17+ prerequisite and DATABASE_URL local setup
- pgvector noted as needed for upcoming resume embeddings
- src/ and playwright.config.ts: comments only, SQLite reasons replaced by
  the reasons that still hold

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a URL options in backup and restore, strip NULs from new text, keep copied resume order and unscored discovered jobs last, guard password redaction and move scripts to node16 resolution

- Import: an already-imported dev.db with no users skips instead of stopping every boot; hostPath is shared by decide.ts and run.ts
- Entrypoint: IMPORT_DRY_RUN exit 2 idles (TERM-aware) so the restart policy does not repeat the rehearsal
- backup-db.sh / restore-db.sh: drop schema, connection_limit and other Prisma-only options before pg_dump/psql; sslmode is kept
- New src/lib/postgresText.ts strips NUL and lone surrogates in resume text extraction, scraped descriptions and add_job descriptions
- Resume copy carries createdAt so entries keep the source order
- Discovered jobs sort with nulls last, pinned in postgresQueryParity.spec.ts
- redact() survives a password with an invalid % escape
- scripts/tsconfig.json: module and moduleResolution node16 (node10 is deprecated); compiled output is unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ted backups, sort undated recent jobs and watched companies last, idle after a failed SQLite import, mask the database password only in URL form and use strict equality in the import copy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ate the company and recent-jobs specs for nulls-last sorting

- copy.ts: the strict-equality change queued an update for every row whose deferred field was undefined; skip both null and undefined
- company.actions.spec.ts / dashboard.actions.spec.ts: expect the nulls-last orderBy and id tiebreaker from 2f2a6b2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its only useful in-container value is the default /data/dev.db, which the
importer already falls back to; any other path would need a new mount.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gsync
Gsync merged commit 8f7ab0f into dev Oct 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant