From abced738bd3448659b200328d72276158da9abc3 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 21 Dec 2017 09:52:42 -0600 Subject: [PATCH] Revert "[MIRROR] Db schema version check by simplification" --- code/game/world.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/world.dm b/code/game/world.dm index 6c49e37456..2853bb2ef6 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -62,15 +62,15 @@ GLOBAL_PROTECT(security_mode) var/db_major = text2num(query_db_version.item[1]) var/db_minor = text2num(query_db_version.item[2]) if(db_major != DB_MAJOR_VERSION || db_minor != DB_MINOR_VERSION) - message_admins("Database schema ([db_major].[db_minor]) doesn't match the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors") - log_sql("Database schema ([db_major].[db_minor]) doesn't match the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors") + var/which = "behind" + if(db_major < DB_MAJOR_VERSION || db_minor < DB_MINOR_VERSION) + which = "ahead of" + message_admins("Database schema ([db_major].[db_minor]) is [which] the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors") + log_sql("Database schema ([db_major].[db_minor]) is [which] the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors") else message_admins("Could not get schema version from database") - log_sql("Could not get schema version from database") else - log_sql("Your server failed to establish a connection with the database.") - else - log_sql("Database is not enabled in configuration.") + log_world("Your server failed to establish a connection with the database.") /world/proc/SetRoundID() if(CONFIG_GET(flag/sql_enabled))