0065 — Schema and data-model parity (Group K)¶
Status¶
Folded across DATA_MODELS/, FEATURES/, OPERATIONS/ — defer to those pages for the canonical description. 16/16 items landed; last ghost reference fixed 2026-08-04. (re-verified 2026-08-06)
Context¶
Sixteen audit findings on doc-vs-doc schema parity — places where ADRs and feature/system docs reference schema fields that don't yet exist in DATA_MODELS, or where DATA_MODELS docs reference columns nobody uses. Two were critical: Sector.defenses JSONB key drift between the canonical drone_blocks (per ../DATA_MODELS/jsonb-schema.md) and the non-canonical shorthand deployed_drones used in ../DATA_MODELS/pirate-holdings.md and ADR-0047 — ADR-0047 stays immutable per ADR rules, its deployed_drones reference now contextual/historical (M-J1); and missing TradeDock columns on Station per ADR-0041, landed as the single tradedock_tier column shape (String(1) nullable, A/B, NULL = not a TradeDock), superseding this ADR's original separate is_tradedock boolean and gateway/industrial/luxury tier vocabulary sketch (R-D1). The remaining fourteen are schema-documentation additions and cleanups: the engaged_pending_arrival NPC status per ADR-0042 (R-I2); the PlayerWarpKnowledge table (player_id+warp_id composite key, discovered_at, discovery_source, corp_shared_at) per ADR-0045 (R-I3); the Region.pirate_ecosystem_state JSONB shape per ../SYSTEMS/pirate-ecosystem.md (R-I5); the Station.defense_state JSONB shape (M-J2); Ship.cargo extended with lumen_crystals/quantum_shards mining drops per ../FEATURES/economy/mining.md (M-E1); two ghost-reference removals — Player.lumen_crystal_inventory (lumen crystals are team-pooled, canonical inventory lives on Team, M-G1) and Player.aria_assistance_level (correct field is PlayerTradingProfile.ai_assistance_level, M-G2); and cross-link debt cleared between ARIA/cluster-naming per ADR-0044 (R-O1), the orphan ARIA columns confirmed load-bearing per ADR-0057 (M-U1), PlayerTradingProfile's feature-doc surface (M-U2), and CentralNexusBank/monetization/region-lifecycle doc pairs (R-O2). Two migration docstring notes — idempotency on fe22441146b1 (Player.personal_reputation) and defaults/backfill on d2e3f4a5b6c7 (the ADR-0049 SK13 monotonic Contract counters) — are gameserver-repo concerns this ADR confirms the design intent for (M-M1, M-M2). No code-side schema changes; this ADR ratifies a coordinated doc-side parity sweep.
Folded into:
- ../DATA_MODELS/stations.md — TradeDock columns (R-D1), Station.defense_state shape (M-J2)
- ../DATA_MODELS/npcs.md — engaged_pending_arrival status (R-I2)
- ../DATA_MODELS/player.md — PlayerWarpKnowledge (R-I3), ghost-reference cleanups (M-G1, M-G2), CentralNexusBank cross-links (R-O2)
- ../DATA_MODELS/galaxy.md — Region.pirate_ecosystem_state shape (R-I5)
- ../DATA_MODELS/jsonb-schema.md — drone_blocks canonical key (M-J1), Ship.cargo extension (M-E1)
- ../DATA_MODELS/pirate-holdings.md — drone_blocks reference fix (M-J1)
- ../OPERATIONS/aria.md — cluster-name narration cross-link (R-O1), orphan-column confirmation (M-U1), PlayerTradingProfile subsection (M-U2)
- ../OPERATIONS/monetization.md + ../SYSTEMS/region-lifecycle.md — CentralNexusBank cross-links (R-O2)
Related¶
- ADR-0041 — TradeDock seeding (R-D1).
- ADR-0042 —
engaged_pending_arrival(R-I2). - ADR-0044 — cluster/formation naming + ARIA narration (R-O1).
- ADR-0045 —
PlayerWarpKnowledge(R-I3). - ADR-0047 — pirate holdings (M-J1 contextual).
- ADR-0049 SK13 — monotonic counter migration (M-M2).
- ADR-0050 —
PlayerCentralBankAccount(R-O2). - ADR-0057 — ARIA columns (M-U1).
../DATA_MODELS/stations.md— TradeDock columns, Station.defense_state shape.../DATA_MODELS/npcs.md—engaged_pending_arrivalstatus.../DATA_MODELS/player.md—PlayerWarpKnowledge, ghost-reference cleanups, CentralNexusBank cross-links.../DATA_MODELS/galaxy.md—Region.pirate_ecosystem_stateshape.../DATA_MODELS/jsonb-schema.md—drone_blocks(canonical),Ship.cargoextension.../DATA_MODELS/pirate-holdings.md—drone_blocksreference fix.