Revert "[MIRROR] Db schema version check by simplification"

This commit is contained in:
LetterJay
2017-12-21 09:52:42 -06:00
committed by GitHub
parent ff4c5907a6
commit abced738bd

View File

@@ -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))