Import docs: adoption playbook + superseded-mappers note + loader status
Some checks failed
CI / backend (push) Successful in 1m39s
CI / naming (push) Successful in 2s
CI / frontend (push) Successful in 8s
CI / migrations-mysql (push) Failing after 8s

Follow-up to the mapper retirement (the new docs missed the prior commit's
staging). Adds docs/IMPORT-ADOPTION.md (two-layer import story + stage/crosswalk
guidance), scripts/migration/README.md (dir superseded, points at the API +
loader), and updates the WJ loader README to complete status.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-07-13 12:18:56 -04:00
parent 474f245ae7
commit 009ac9f9ef
3 changed files with 107 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
# scripts/migration (superseded)
The direct-SQL migrators that used to live here (`migrate_assets.py`,
`migrate_communications.py`, `migrate_notifications.py`, `migrate_usb.py`,
`run_migration.py`, `verify_migration.py`) and `scripts/import_from_mysql.py`
were **removed** - they had drifted badly out of sync with the current schema
(they targeted a nonexistent `equipment` table, the retired `Machine` model, and
columns that no longer exist) and were actively misleading.
## Use the import API + a site loader instead
Legacy data is imported through the maintained, schema-agnostic contract in
[`docs/IMPORT-API.md`](../../docs/IMPORT-API.md) (create through real endpoints
with an admin PAT + `X-Import-Mode`). Each adopting site writes a thin loader
that reads its own source database and drives that API.
- Reference implementation: [`scripts/site_imports/wjf/`](../site_imports/wjf/)
(West Jefferson classic-ASP -> flask).
- Adoption playbook: [`docs/IMPORT-ADOPTION.md`](../../docs/IMPORT-ADOPTION.md).
## What's kept here
- `fix_legacy_schema.sql` - one-time SQL fixups against a legacy source DB.
- `one-offs/` - individual one-shot SQL snippets (see its README).