import_issues

Operational diagnostics log for import problems
SQL Support Diagnostics
import_issues

Purpose

Stores diagnostic records when army import parsing or commit logic encounters unmatched units, resolution failures, or commit-level errors. This is a support and debugging table, not a core gameplay table.

Columns

Column Type Null Notes
idbigint unsignedNoPrimary key
user_idbigint unsignedNoUser who triggered the import
source_formatvarchar(50)NoOWB / NR / SIC etc.
systemvarchar(50)YesGame system text
list_namevarchar(200)YesImported list name snapshot
race_textvarchar(200)YesRace text seen during import
faction_textvarchar(200)YesFaction text seen during import
unit_namevarchar(200)YesProblematic unit name
unit_typevarchar(50)YesProblematic unit type
qtyintYesParsed quantity snapshot
pointsintYesParsed points snapshot
error_codevarchar(80)NoCompact issue classifier
error_detailvarchar(255)YesShort detail text
created_atdatetimeNoCreation timestamp

Keys and indexes

  • PRIMARY KEY (id)
  • KEY idx_import_issues_user (user_id)
  • KEY idx_import_issues_created (created_at)
  • KEY idx_import_issues_error (error_code)

Foreign keys

  • fk_import_issues_user: import_issues.user_id → users.id ON DELETE CASCADE

Used by

  • OWB import commit endpoint
  • New Recruit import commit endpoint
  • 2nd in Command import commit endpoint
  • Import debug/support analysis

Design notes

  • This is intentionally a lightweight operational log table
  • It stores contextual snapshots rather than only a raw stack/error blob
  • It is designed for supportability, not strict normalization
  • No delete/retention strategy is visible in schema

Why this table matters

Import reliability is one of the main complexity points in BattleScore. This table provides the evidence trail needed to debug bad roster text, unresolved units, and schema/content mismatches without relying solely on ephemeral logs.

Risks

  • Can grow indefinitely without retention rules
  • Only stores short detail text, so very deep diagnostics may still require server logs
  • Operational usefulness depends on disciplined error-code usage in application logic

Recommended future improvements

  • Add retention or archival policy
  • Standardise error_code taxonomy centrally
  • Consider linking to richer debug payloads if import complexity grows further