Skip to content

Persist 'nullified' death bans and add DB support#53

Merged
Nergly merged 2 commits intomasterfrom
codex/explain-spectator-ban-6swgn1
Apr 24, 2026
Merged

Persist 'nullified' death bans and add DB support#53
Nergly merged 2 commits intomasterfrom
codex/explain-spectator-ban-6swgn1

Conversation

@Nergly
Copy link
Copy Markdown
Owner

@Nergly Nergly commented Apr 24, 2026

Motivation

  • Retain death records that do not produce an active death ban by marking them as nullified so history is preserved and consumers can treat them differently.
  • Provide database and mapper support for the new flag so persistence and replication work across servers and schema versions.

Description

  • Add a nullified boolean to Ban with constructors, isNullified/setNullified, and include it in serialize and Deserialize.
  • Always store a death record for banTime == 0 in PlayerData, mark it nullified, and still add/remove it from server data and update the player repository.
  • When removing an ongoing ban in ServerData, set nullified to true on the ban before removing.
  • Extend MySQLBanMapper to detect whether the nullified column exists, include it in the generated INSERT/UPDATE SQL and parameter binding, and safely read nullified from result sets for backward compatibility; update dbsetup.sql to add the nullified column with default 0.

Testing

  • Ran the project's automated test suite and mapper unit tests, which completed successfully.
  • Exercised the MySQL mapper against schemas with and without the nullified column to verify detection and backward-compatible reads succeeded.

Codex Task

@Nergly Nergly merged commit 2ad664c into master Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant