ADR-014: schema-lean per-site (investigation + idempotent create_plugin_tables)

Cross-plugin FK blocker ADR-013 cited is already resolved: the FKs into
machines were held only by dead legacy tables (machinerelationships,
printerdata, installedapps, communications.machineid) that existing
migrations 7a01/7c01 already drop. No live plugin table hard-FKs another
plugin. Schema-lean is unblocked.

Enabling change: create_plugin_tables now skips already-existing tables
(idempotent) so a plugin anchor can create its tables on a fresh lean
install and no-op on a database that has them from the pre-cutover
baseline. The load-bearing baseline lift is staged as ADR-014 Phase 2.
This commit is contained in:
cproudlock
2026-07-19 00:36:27 -04:00
parent 5861caf78f
commit 42ca8d75c3
5 changed files with 131 additions and 6 deletions

View File

@@ -23,6 +23,7 @@ Architecture decisions live in `docs/adr/`. Read those before making schema or c
- ADR-011: Machines rename + modeltypes retyping - ACCEPTED
- ADR-012: GE-Enforce manifest ownership in shopdb - ACCEPTED
- ADR-013: Plugin catalog, curated shelf, and lean per-site builds - PROPOSED
- ADR-014: Schema-lean per-site builds (retire cross-plugin FKs, lift plugin tables) - PROPOSED
## Coding convention