Stability fixes, profile path and more.

Fixed a bunch of data races which should lead in stability improvements.

Added possibility to specify game profile path within profile item.

Added Urban Terror 4.3.2.
This commit is contained in:
2017-05-08 23:38:54 +05:00
parent 1836c46d66
commit 1e676437d8
15 changed files with 136 additions and 32 deletions

View File

@@ -49,6 +49,7 @@ func migrate_full(db *Database, version int) {
if version == 7 {seven_to_eight(db); version = 8}
if version == 8 {eight_to_nine(db); version = 9}
if version == 9 {nine_to_ten(db); version = 10}
if version == 10 {ten_to_eleven(db); version = 11}
}
// Initial database structure.
@@ -123,3 +124,10 @@ func nine_to_ten(db *Database) {
db.Db.MustExec("ALTER TABLE servers ADD bots VARCHAR(2) NOT NULL DEFAULT '0'")
db.Db.MustExec("UPDATE database SET version=10")
}
// Urban terror's profile path.
func ten_to_eleven(db *Database) {
fmt.Println("Upgrading database from 10 to 11...")
db.Db.MustExec("ALTER TABLE urt_profiles ADD profile_path VARCHAR(4096) NOT NULL DEFAULT '~/.q3ut4'")
db.Db.MustExec("UPDATE database SET version=11")
}