Skip to content

Instantly share code, notes, and snippets.

@shavitush
Last active October 14, 2022 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shavitush/cfd329998c3d311ad5879f0052346bcc to your computer and use it in GitHub Desktop.
Save shavitush/cfd329998c3d311ad5879f0052346bcc to your computer and use it in GitHub Desktop.

31/05/2019 if you are running v2.5.5 or above (from very_good_yes branch), there's some good news. unless you're on sqlite of course. if you're on sqlite, you might have to stick to the same version, or recreate your database i've added database migration and lots of optimizations, you don't need to do them on your end because the plugin will automatically do them for you! however, the first batch of database migrations contains 12 migrations, which is a lot. some of them take a while to execute, and some will be pretty much instant

because of that, when you upgrade to from v2.5.4 or older, to v2.5.5 or newer i ask you to follow the following procedure:

  1. DO A DATABASE BACKUP!! YOUR DATABASE MIGHT BREAK IF THE MIGRATION IS BEING INTERRUPTED AND YOU WILL LOSE DATA!!
  2. if you have more than one server running the same database, take them all offline until this process is done
  3. close access to the game server that will perform the database migration. via password, server maintenance plugins, firewall, or whatever solution you can think of
  4. update the game server to the latest version of bhoptimer, and start it. the server console will show "applying migration..." lines. let it run, it can take from 5 sec up to even 10 minutes, depending on the size of your database and your server's specs
  5. when the migration is done, you should see a migrations table in your database with entries from 0 all the way to 11 (as of v2.5.5. newer versions might have more). if you see this, it means that the migration is completed
  6. if the migration is completed, you can shut down the server, remove the password and put it back online :)

frequent issues when migrating the database:

Timer (zone refresh) SQL query failed. Reason: Unknown column 'flags' in 'field list'
  • this is fine. the error happens because the zones plugin has no way of knowing if the migration has happened already or not. it should go away right after finishing the migration
Timer (rankings, update all points) error! Reason: Incorrect integer value: '[U:1:steamid]' for column ..steamid at row X
  • the database migration was interrupted or you haven't closed access to the server while migrating! run it again starting from step 1. i hope you have a backup, otherwise this will be a pain in the ass to fix and i will not manually fix your broken database, sorry.

if you notice anything weird with the migration, let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment