fix(server): hub moderation persistence, schema migrator, and hardening - #122
Open
Cod-e-Codes wants to merge 11 commits into
Open
fix(server): hub moderation persistence, schema migrator, and hardening#122Cod-e-Codes wants to merge 11 commits into
Cod-e-Codes wants to merge 11 commits into
Conversation
ARCHITECTURE still pointed at CreateSchema in handlers.go and omitted ban_history.expires_at / schema_version; TESTING still suggested @latest.
Close open rows before insert, persist before updating in-memory maps, and load the latest open row by id so kick-then-ban and legacy duplicates restart cleanly.
SQLite and Postgres apply each version inside a transaction with rollback on mid-migration failure; MySQL DDL implicitly commits so it stays non-wrapping with schema_version recorded only after a successful apply.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ban_history.expires_at)MigrateSchemawith hard-fail verification; SQLite/Postgres transactional per version; MySQL documented as non-wrapping (DDL implicit commit).golangci.yml(v2)Eleven sequential commits (do not squash).
Test plan