Updating & database
How the schema works
Section titled “How the schema works”You never import schema by hand. bs_core has the migrations in bs_core/sql/ (001_core_schema.sql … 028_guard_log.sql), and the list in bs_core/server/sv_migrations.lua. On start it runs every file that isn’t in the bs_migrations table yet and records it. Applied ones never run again.
So an update that brings a new table is just: update the files, restart. The console prints which migration it applied.
Some resources (bs_config, bs_guard, bs_vip, bs_factions progression) also create their own tables on start if they are missing. That’s a safety net, the migration is still the real source.
Before any update: back up
Section titled “Before any update: back up”powershell -ExecutionPolicy Bypass -File .\tools\Backup-Database.ps1 -Database beyondsurvival -User beyondIt asks for the password and writes a timestamped .sql into database-backups/. It uses --single-transaction, it doesn’t lock or change the live DB.
Do it every time. Migrations only go forward, there is no “down”.
Updating
Section titled “Updating”- Stop the server.
- Backup (above).
- Replace the changed resources. Keep your edited config files, or diff them against the new ones. New keys in a config are usually needed by the new code.
- Don’t touch
server.private.cfg. Checkserver.cfg.examplefor newensurelines and add them to yours. - Run
tools\Test-Deployment.ps1. - Start and watch the console for red lines.
Your F1 profiles live in the database, they survive updates. A profile key that doesn’t exist anymore is just ignored.
Never copy cache/ between machines or versions, delete it if something looks weird after an update.
Moving to another PC
Section titled “Moving to another PC”The release package doesn’t contain the database on purpose. Back up on the old one, then on the new one create a new empty database and:
powershell -ExecutionPolicy Bypass -File .\tools\Import-Database.ps1 -Database beyondsurvival -User beyond -BackupFile D:\transfer\beyondsurvival-YYYYMMDD-HHMMSS.sqlIt never drops a database and asks you to type IMPORT first. Keep the original backup until the new server has run fine for a while.
Treat that .sql file as private. It has every character, inventory, faction bank and identifier.
Fresh world with txAdmin
Section titled “Fresh world with txAdmin”txadmin/recipe.yaml deploys the release plus a new empty database through txAdmin’s Server Deployer. It’s a new world, nothing from the old DB comes along. See txadmin/README.md for the zip layout.
bs19.org · Privacy · Terms · Cookie settings