For new games that haven’t done an upgrade yet, there’s a bug that could inadvertently reset certain configuration options back to their default values when you upgrade.
If you’ve already done a code upgrade, even once, this bug won’t affect you.
I’ll fix this bug in the next patch, but since the bug happens on upgrades - the patch won’t help you!
To avoid the bug, use tinker and replace the tinker command’s handle method with this one. Then run tinker
from in-game to execute this code:
def handle
migrator = DatabaseMigrator.new
applied_migrations = migrator.read_applied_migrations
migrator.available_migrations.each do |file|
migration_name = File.basename(file, ".rb")
if !applied_migrations.include?(migration_name)
applied_migrations << migration_name
end
end
File.open(migrator.applied_migrations_path, 'w') do |file|
file.write applied_migrations.join("\n")
end
client.emit_success "Done!"
end
If you’re not sure if you’ve done an upgrade or not, you can go ahead and run that code just to be safe. It won’t do any harm if you’ve already upgraded.