Upgrading from 1.0.0-rc.3 to 1.0.0
Handbook · Operations · Changelog (CHANGELOG.md)
These are the operator steps for moving an installation from the 1.0.0-rc.3 release archive to 1.0.0 on MariaDB 10.6 or later, or MySQL 8. Do them in order. The upgrade needs a maintenance window, for three reasons:
- the ledger-heads migration must run with the site down;
- an installation that runs Gamekit must move to Gamekit 1.3.0 together with the engine: in the same window, or, where Gamekit comes from the marketplace, from the admin as soon as the site is back up;
- the engine now runs MySQL and MariaDB sessions at READ COMMITTED, which the database server must allow.
An installation on SQLite skips the database checks. The isolation setting does not apply there, and the timestamp migration does nothing on SQLite. Coming from a release candidate older than rc.3, also read the rc.3 section of the changelog.
Run every command from the installation's backend directory with the same PHP CLI the cron entries use. On Plesk that is /opt/plesk/php/8.3/bin/php artisan ...; see native scheduler and worker setup.
Shared hosts. On a shared host (for example under Plesk), only touch your own site's folder and databases. Do not install server-wide packages or restart global services, and never reset a live database (migrate:fresh, db:wipe) to fix a problem.
Before the window (read-only)
-
Check the database server. READ COMMITTED needs
binlog_formatROW or MIXED when binary logging is on. On MariaDB:SELECT VERSION(), @@global.binlog_format, @@global.log_bin, @@global.tx_isolation;On MySQL 8, read
@@global.transaction_isolationinstead of@@global.tx_isolation. The upgrade is safe iflog_binis 0 or the format is ROW or MIXED. With STATEMENT, every write fails with error 1665. In that case either change the binlog format first, or setDB_ISOLATION_LEVEL=server. That keeps the server default (usually REPEATABLE READ) and gives up the protection READ COMMITTED adds; see transaction isolation. -
Get Gamekit 1.3.0 ready, if the installation runs Gamekit. Engine 1.0.0 locks the player's
usersrow beforeplayer_statsin every payment (EconomyService::LOCK_ORDER = 2; see economy). With Gamekit 1.2.x, a Gamekit money action can deadlock against a plain credit. Gamekit 1.3.0 on rc.3 logs a critical "degraded" message, notifies admins and can deadlock the same way. How you deploy it depends on where Gamekit comes from. If you put the plugin's files in place yourself, switch both in step 6. If the installation gets its plugins from the marketplace, Gamekit cannot be updated inside the window: while the application is down the admin answers 503, and no artisan command updates a marketplace plugin. Update it from the admin straight after step 9 instead. The bundled referrals 1.1.2 and commercekit 1.0.1 checkLOCK_ORDER >= 2, so they are safe with either engine. -
Review
.env. No new key is required. Keys new or changed since rc.3:Key Default when unset Notes DB_ISOLATION_LEVELREAD COMMITTEDOne of the four standard levels, or empty / serverfor the server default. Any other value fails at config load.PULSE_FIRST_PARTY_ONLYon, unless APP_ENVislocalortestingRefuses installing, updating, uploading, enabling or activating packages that are not by Blackwave Studios. PULSE_FIRST_PARTY_VENDORSlf-studioMarketplace vendor slugs trusted for marketplace downloads. PULSE_FIRST_PARTY_AUTHORSBlackwave StudiosExtra legacy author names, comma-separated. PULSE_FIRST_PARTY_HUB_AUTHOR_FALLBACKfalse Only for a hub that does not send vendor.slugyet. Leave it false.PULSE_ACTIVITY_RECEIPT_DAYS90 Days a player.activityreceipt is kept before the daily prune deletes it.PULSE_EXTENSIONSevery packages/*/pulse-extension.jsonColon-separated extension roots. Set but empty loads none. MARKETPLACE_INSTALLS_URLderived from the marketplace address: /marketplace-hubat the end becomes/installsWhere the optional marketplace check-in and player count are sent. Unused while that check-in is off, which is the default (see "Other changes to expect"). All of these appear, commented out, in
backend/.env.example. Core no longer readsOPEN_WORLD_*,WORLD_EDITOR_*,PULSE_ASSET_*orROOM_ENDPOINT_ALIASES; the 3D toolkit moved to the separatepulse-3dextension.If the installation runs plugins or themes that are not by Blackwave Studios, decide on
PULSE_FIRST_PARTY_ONLYbefore the upgrade. Those packages keep running, but while the policy is on they cannot be updated, re-enabled or installed. -
Take a backup, for example with
php artisan pulse:backup:database. A separate dump ofidempotency_keys,stage_ticketsandplayer_claimsmakes the timestamp repair in step 7 easy to compare.
Confirm before the window:
- Restarting PHP-FPM for this site only. Step 8 restarts the site's PHP-FPM pool so that every web process opens new database connections at the new isolation level. This handbook documents no command for a site-scoped restart on Plesk. Agree the exact method before the window. Never restart the global PHP-FPM service on a shared host.
- Workers during maintenance mode. The steps below pause the scheduler and worker cron entries and stop Horizon or the queue workers, as in the restore runbook. Whether a worker that is still running keeps processing jobs while the application is down has not been verified for this release. Make sure every worker has exited before step 7.
In the window
-
Stop writers and take the site down.
php artisan downPause the scheduler and worker cron entries, then run
php artisan horizon:terminate(orphp artisan queue:restart). A deploy hook that runsmigrate --forcewith the site up must not be used for this release. An entry written by the old code after the ledger-heads backfill is missing from its user's head, and that user's next entry forks the chain permanently. -
Switch the code to 1.0.0, and to Gamekit 1.3.0 if the installation runs Gamekit and you deploy its files yourself (step 2).
Extracting the release archive over the old installation adds and replaces files but deletes none, so files that 1.0.0 no longer contains stay on disk. The release test counted 2,448 of them coming from rc.3. These notes assume that in-place replacement, which leaves your
.envfiles,storageand uploads where they are, and the upgrade was tested with the leftover files in place. Leave them. -
Migrate and repair the ledger heads.
php artisan migrate --force php artisan pulse:ledger:audit --repair-heads --chains--repair-headsrecomputes every head from the ledger and refuses, with exit 1, unless the application is in maintenance mode. The command can also exit 1 because--chainsfound forks written before this release. Those forks are expected and stay in the history. Do not chain the next step with&&orset -e, or the site stays down: read the report, then continue. The migrations can be rerun after a partial failure.Migrations new since rc.3, all under
backend/database/migrations:Migration Effect 2026_11_11_120000_add_role_colour_and_plugin_admin_accessNullable roles.colorand the newrole_plugin_admin_accesstable.2026_11_12_120000_create_economy_ledger_heads_tableNew economy_ledger_heads, backfilled fromeconomy_transactions. Run with the site down (step 5).2026_11_13_090000_add_target_user_id_to_activity_logsIndexed nullable activity_logs.target_user_id, backfilled from metadata in chunks.2026_11_13_090100_add_source_to_device_fingerprintsNullable device_fingerprints.source. Existing rows stay null.2026_11_13_120000_keep_admin_actions_when_a_user_is_deletedactivity_logs.user_idbecomes nullable with ON DELETE SET NULL, andactor_usernameis backfilled. On MariaDB this rebuildsactivity_logsin place, which takes time on a large table.2026_11_13_120100_index_player_activity_receipts_created_atIndex for the daily receipt prune. 2026_11_13_140000_drop_timestamp_auto_update_on_mariadbMySQL and MariaDB only. Redefines idempotency_keys.expires_at,stage_tickets.expires_atandplayer_claims.claimed_atasTIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, withoutON UPDATE, and recomputes the expiry of stored idempotent responses fromcreated_at. Paststage_ticketsandplayer_claimstimes are not repaired.2026_11_14_090000_add_last_active_index_to_usersAdds the index users_last_active_indexonusers.last_activewhere it is missing, and does nothing where it exists. MariaDB builds it in place, so reads and writes continue, but the statement waits behind any long-running transaction onusers. On a large table, run it at low traffic, or build the index beforehand withALTER TABLE users ADD INDEX users_last_active_index (last_active), ALGORITHM=INPLACE, LOCK=NONE;and the migration then skips.2026_11_15_090000_create_email_template_contents_tableNew email_template_contents: one row per email and language, holding the draft and a pointer to the published version.2026_11_15_090100_create_email_template_versions_tableNew email_template_versions: the published versions, append-only. Until both tables exist, email is sent from the oldemail_templatesrow or the built-in default.rc.3 also shipped nine 3D migrations (
world_scene_draftsand theopen_world_*tables) that core no longer contains. An rc.3 database keeps those tables and theirmigrationsrows, and 1.0.0 neither drops nor runs them. Leave them in place. -
Rebuild the configuration cache and restart long-running processes. The isolation level applies to each new database connection.
php artisan config:cacheThen restart this site's PHP-FPM (see "Confirm before the window"), and Horizon or the queue workers. The worker cron entries start them again on the new code once they are resumed in step 9.
If the Mafia: Underworld kit is already applied, run this once, after updating the code (and after rebuilding the player, if you build it yourself instead of using the release's built player):
php artisan kit:install mafia-underworldThe update replaces the Noir Syndicate stylesheet (1.0.1 to 1.0.2), but the installed theme keeps the integrity pin of the old one. Until you run this, browsers refuse
theme.cssand players see the site without its theme.This is a normal kit install, so it relies on the backup from step 4. Because the kit version changed (1.3.2 to 1.3.3), it runs the kit's seeder again. The seeder only adds what is missing and keeps the values in rows you edited (on an existing item it only adds stat keys the item lacks), but it puts back a kit setting, crime, item, Black Market shop or stock row that you deleted or renamed. Add
--no-seedto skip it; the next kit install without--no-seedthen runs it. The command also runs any pending migrations of the kit's plugins, turns a kit plugin you had disabled back on, and makes Noir Syndicate the active theme again; if you use another theme, activate it again afterwards. It rewrites no file that is already identical, and pins the stylesheet now on disk.If you edited one of the kit's files under
frontend/src(views/game,components/mafia, the two Mafia composablesuseMafiaHub.tsanduseSyndicateComms.ts,router/product-routes.ts) or a file in anoir-syndicatetheme folder, and the edit survived the update, the command stops before it changes anything and names the file. Run it again with--forceto replace it (the old file is kept understorage/app/kits/kit-mafia-underworld/backupsand the path is printed), then reapply your edit and rebuild the player.--forcealso runs the seeder again unless you add--no-seed. An editedtheme.csscannot be put back: the stylesheet is pinned, so a changed copy is refused again; keep such changes in a theme of your own. -
Bring the site back.
php artisan upGamekit from the marketplace. If the installation gets Gamekit from the marketplace (step 2), update it to 1.3.0 now, from the admin's Marketplace screen, before players act. Until you do, Gamekit 1.2.x runs on engine 1.0.0, and a Gamekit money action can deadlock against a plain credit.
Docker stack. While the application is in maintenance mode the backend container's health check is answered with 503, and after about two minutes Docker reports that container as unhealthy. The other services wait for a healthy backend, so a
docker compose up -drun straight afterphp artisan upcan fail once with exit 1. Run it again; the next health check, at most 10 seconds later, passes.Resume the scheduler and worker cron entries. Three scheduled tasks are new, and all run through the existing
schedule:runcron:Task When What it does pulse:activity-receipts:prunedaily at 03:20 Deletes player.activityreceipts older thanPULSE_ACTIVITY_RECEIPT_DAYS.pulse:vault-check-inhourly Sends the optional marketplace check-in, at most once a day. Sends nothing while the check-in is off. pulse:vault-report-playersevery 15 minutes Sends the optional online player count. Sends nothing while the check-in is off or no listing is set.
After the window (read-only checks)
-
php artisan pulse:ledger:audit --chainsreports no stale heads. Forks from before this release may still be listed. -
On MariaDB, this query returns no engine columns. Plugin tables can still have such columns:
SELECT TABLE_NAME, COLUMN_NAME, EXTRA FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND DATA_TYPE = 'timestamp' AND EXTRA LIKE '%on update%'; -
If Gamekit is installed, no critical log line or admin notification says that Gamekit 1.3.0 needs an engine whose
EconomyServicelocks theusersrow first. -
Update monitors that read
php_versionorenvironmentfromhealthz/live, or check details fromhealthz/ready.healthz/readynow returns one status per check and is throttled to 60 requests a minute per client.
Other changes to expect
These need no step in the window, but scripts, staff and monitors may notice them.
- Kit installs can now exit 1.
php artisan kit:installandphp artisan gamekit:installexit 1 when an optional plugin of the kit failed, or was skipped at preflight (a missing or incompatible package, a refused third-party author, an outdated registered version or a dependency error). The rest of the kit is installed and the command names the plugin.--dry-runof a local recipe exits 1 for a plugin it would skip. A deploy script that treated exit 0 as "kit installed" must fix or drop the plugin, or read the message before it stops. - Admin email changes ask for the password again. Saving or testing the email settings, creating, changing, deleting or seeding a template, a manual send, a test send, and publishing, resetting or rebranding in the email template library need a password confirmation in the same browser session in the last 15 minutes. Without it the API answers 423 with
reauth_required, and the admin panel asks for the password. A script that calls these routes with a bearer token is always refused. Reading, previewing, saving or discarding a draft, and restoring an old version into the draft, do not need it. - New account emails. While the admin email settings are active, players get an email when their password changes, when two-factor is switched on or off, and when staff ban or unban them from the admin Users screen. A ban that runs out, an anti-multi cluster ban and removing the
bannedflag in the user tools send no email. Each email uses, in order: the version published for the player's language, the version published for English, an active legacyemail_templatesrow of the same key, then the built-in English default. The legacy raw-HTML templates and their admin routes still work. They are sent as queued mail. Queued email now uses the mail settings saved in the admin when it is delivered, not the worker's environment mailer. - New request limits.
POST /api/v1/user/change-password,POST /api/v1/2fa/confirmandPOST /api/v1/2fa/disableallow 5 requests a minute each. Account emails are limited per recipient address: 2 notices of one kind in 10 minutes and 12 a day, and verification emails 3 in 10 minutes and 10 a day. Over a limit the email is dropped and a warning is logged with the template name; the account action still succeeds. Admin routes with a new limit of their own:GET /api/v1/admin/system/health30 a minute,POST /api/v1/admin/email/settings/testand a template library test send 5 a minute, a template library preview 60 a minute, andPUT /api/v1/admin/marketplace/reporting10 a minute. - A ban reason is at most 1000 characters on
POST /api/v1/admin/users/{user}/ban. A longer one is refused with 422. - The optional marketplace check-in stays off. The upgrade sends nothing. An administrator can switch it on under Admin > Plugins > Marketplace > Connection. It then sends once a day a signed check-in: a random install id, the install's public key, a timestamp, the engine version, and the slug and version of at most 100 installed plugins and themes. If a directory listing is entered, it also sends every 15 minutes a signed player report: the install id, the listing slug, a timestamp and the number of signed-in players active in the last five minutes (capped at 100,000). That report links the install id to the listing. Neither message carries a domain, player data or account details. Switching it off sends a signed switch-off, which is sent again hourly until the marketplace accepts it; nothing else is sent.
- A new public route,
GET /.well-known/pbbg-vault/{challenge}, answers the marketplace's domain check for a licence. The application serves it (backend/routes/web.php), so the web server must pass/.well-known/pbbg-vault/on to it. A domain can also be verified by DNS TXT. - Two new outbound marketplace behaviours. After a marketplace sync that finds a valid licence, the engine asks the marketplace to check its domain (
POST <marketplace address>/domain-verification/check, with the host the sync request came in on; local, single-label and IP hosts are never sent). Every marketplace request now carries anAccept-Languageheader with the language of the current request. - Admin System Health shows "unknown" for anything the server cannot measure, for example the process list on a host that does not allow
ps. Before, it showed invented values. Unknown is not a fault report.
Going back
Restore the backup from step 4 together with the rc.3 code rather than relying on migrate:rollback. The timestamp migration's down() does nothing, and the keep_admin_actions_when_a_user_is_deleted rollback deletes activity rows whose actor account was deleted.
For plugin and game authors
These need no operator action, but code built against rc.3 may need a change:
- Lock
usersfirst before paying, or checkEconomyService::LOCK_ORDER >= 2(see economy). - The player
api.get()no longer caches by default; passcacheTTLto opt in.api.patchandapi.deletenow reject on HTTP errors, so theircatchblocks run. - A new timestamp column must use
->useCurrent()or->nullable(), never a bare NOT NULL timestamp. MariaDB before 10.10 turns that column into one that resets itself on every update. - READ COMMITTED does not prevent lost updates between two unlocked read-modify-write sequences. Keep using
lockForUpdate().