Files
sales-trainer/docs/engineering-log/2026-08-15-postgresql-import-gate.md

23 lines
2.0 KiB
Markdown

# PostgreSQL Importer Gate — 2026-08-15
Date: 2026-08-15
Status: temporary-local PostgreSQL importer gate passed; target-data cutover remains pending
## Scope
This entry records S4.4 importer execution against the migrated schema in a randomly named temporary local PostgreSQL database. The source was a disposable fixture based on `backend/tests/test_json_import.py`; it contained no production data. No production database, JSON store, credential, deployment, or runtime cutover was touched.
## Verification evidence
- CLI dry-run — **passed**; metadata-only report returned expected counts: 1 organization, 1 user, 2 groups, 2 personas, 1 session, and 2 messages. No password hash or connection string appeared in serialized output.
- First CLI apply — **passed**; created 1 organization, 1 user, 2 groups, 2 personas, 1 session, and 2 messages. A fresh source backup directory was created before the target transaction.
- Second CLI apply — **passed**; created 0 rows and reported all existing rows as `unchanged`.
- Target row-count verification — **passed**; PostgreSQL contained exactly the expected fixture counts.
- Conflict/transaction rollback — **passed**; after adding new org/user/group rows and changing an already-imported group, the importer returned its generic rejection code, preserved the original group, and rolled back the new rows that were queued earlier in the same transaction.
- Alembic downgrade to base — **passed**; zero application tables remained.
- Temporary database, fixture, and backup directories were cleaned up after the probe.
## Boundaries
This closes the **local fixture-to-PostgreSQL importer behavior** gate only. It does not approve applying a real JSON snapshot, audit migration, Redis persistence, runtime repository cutover, production rollback, deployment, or public access. A real target operation still needs an independently retained backup, target checksum/count comparison, operator approval, and a rollback rehearsal against the actual target environment.