Repository navigation
docs(provincesystem): retire the SQLite rollback and rename entitlement tables - #295
Merged
Merged
Conversation
…nt tables Both sites run on PostgreSQL. Deploys always run prepare and studio, refuse revisions from before the move and keep only PostgreSQL dumps. Preview clones list Dev's tables from its schema. rpc_player_meta is now web_entitlements and character_player_meta is now character_account_meta. Login codes drop their plaintext once spent, revoked or expired. Companion to TF-Minecraft/TFMCWeb#267. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prepare refuses a revision that lacks a migration the database already has, so an older-commit deploy is refused after a newer migration and a failed deploy that migrated keeps the backend stopped. Previews of branches cut before a new Dev migration need a rebase. Companion to TF-Minecraft/TFMCWeb#267 (d839fc24). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
site-deploy compares schema_migrations with the target revision's migration files and refuses a revision missing one (exit 4). After a failed deploy it checks the last healthy revision the same way and keeps the backend stopped if the database is newer. Companion to TF-Minecraft/TFMCWeb#267 (aa54b7b3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Companion to TF-Minecraft/TFMCWeb#267.
site-deployrefuses revisions from before the move, always runsprepare(migrates the database the authority marker names) thenstudio, also when it returns to the last healthy revision, and keeps only PostgreSQL dumps (newest 10). The copy tool,legacy_sqlite.sql, reverse export and the 30-day retention guidance are gone; oldprovince.dbfiles are plain backups. Migrations only go forward: before changing anything,site-deploycomparesschema_migrationswith the target revision's migration files and refuses a revision missing one (exit 4,<sha> predates database migration NNNN; fix forward). After a failed deploy it checks the last healthy revision the same way; if the database is newer, the backend stays stopped (failed: database is newer than the last healthy revision; backend kept stopped).preparerepeats the check. Previews of branches cut before a new Dev migration fail until rebased.precedent_*,patchnote_*andschema_migrations. Readiness text now reflects thatNATIVE_POSTGRES_PREVIEWS_READYis on.rpc_player_meta→web_entitlements(skin_kinds,permission_flags);character_player_meta→character_account_meta(18+, account creation time, kit cooldowns). The character limit, name colours and wardrobe slots come only fromweb_entitlements; unsynced players get the catalogue default limit. Updated in architecture, creator, tfmcweb, auth-security, title-editor, skins, drinks and RPCharacters realm-wipe. Removed the staledrink_player_metaline and the deprecated/skins|/drinks/plugin/player-metamentions (those routes no longer exist).backend/scripts/web_entitlements_smoke.py.Host steps: root installs ProvinceSystem#267's
scripts/site-deploy.shon the host before #267 merges, so the deploy that first applies 0002 is protected;scripts/ps-preview.shcan follow after merge (DEPLOY.md, host scripts).Checks:
python -m unittest discover -s scripts -p 'test_*.py'andpython scripts/check-indexes.pypass.🤖 Generated with Claude Code