Favorites servers fix, one server update and show privates.

Fixed favorites servers - they now correctly added/removed in/from cache,
and also fixed favorite server edition dialog, which now also takes
advantage from server's cache.

Added new toolbar button for updating one server. It works :).

Added new column in servers lists, which shows is server is private or public.
This commit is contained in:
2016-10-07 14:28:44 +05:00
parent 51b23fa68f
commit 464946b7f6
8 changed files with 191 additions and 154 deletions

View File

@@ -47,6 +47,7 @@ func migrate_full(db *Database, version int) {
if version == 5 {five_to_six(db); version = 6 }
if version == 6 {six_to_seven(db); version = 7}
if version == 7 {seven_to_eight(db); version = 8}
if version == 8 {eight_to_nine(db); version = 9}
}
// Initial database structure.
@@ -107,3 +108,10 @@ func seven_to_eight(db *Database) {
db.Db.MustExec("ALTER TABLE servers ADD players_info VARCHAR(8192) NOT NULL DEFAULT ''")
db.Db.MustExec("UPDATE database SET version=8")
}
// Is server private flag.
func eight_to_nine(db *Database) {
fmt.Println("Upgrading database from 8 to 9...")
db.Db.MustExec("ALTER TABLE servers ADD is_private VARCHAR(1) NOT NULL DEFAULT '0'")
db.Db.MustExec("UPDATE database SET version=9")
}