Skip to content

Remove settings and statistics from server API and NetworkService - #818

Merged
chrxh merged 1 commit into
developfrom
features/RemoveSettingsAndStatisticsColumns
Jul 30, 2026
Merged

chrxh merged 1 commit into
developfrom
features/RemoveSettingsAndStatisticsColumns

Conversation

@chrxh

@chrxh chrxh commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Since simulations are serialized into a single sim file, the separate settings and statistics payloads no longer exist. The client still sent empty strings for them and the server still stored them.

Changes

Server (scripts/Server/main.py)

  • Drop the settings and statistics columns from the Simulation model, so new databases no longer create them.
  • /uploadsimulation and /replacesimulation no longer read or store those fields. settings was a required form field before; removing it keeps older clients working, since unknown form fields are ignored anyway.
  • Remove the /downloadsettings and /downloadstatistics endpoints. They had no caller in the client.

Client (source/Network/NetworkService.cpp)

  • Remove the empty placeholder fields from uploadResource and replaceResource.

Tests

  • Adapt the upload helper and the resource API tests; the download test now covers /downloadcontent only.

Notes

No database migration is included, as agreed. An existing production database keeps both columns physically, and settings is NOT NULL without a default there, so inserts from the new code would fail against it. If the live database is kept, it needs:

ALTER TABLE simulations DROP COLUMN settings, DROP COLUMN statistics;

Testing

  • NetworkTests.exe (4), EngineInterfaceTests.exe (174), PersisterTests.exe (70) all pass.
  • The Python server tests were not run: no Python interpreter is available on the development machine.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chrxh
chrxh merged commit 4d6a9cb into develop Jul 30, 2026
2 checks passed
@chrxh
chrxh deleted the features/RemoveSettingsAndStatisticsColumns branch July 30, 2026 17:40
@chrxh
chrxh restored the features/RemoveSettingsAndStatisticsColumns branch July 30, 2026 19:25
@chrxh
chrxh deleted the features/RemoveSettingsAndStatisticsColumns branch September 22, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant