From 0b920a390e7ffbe77575f0c29c19ac286785929b Mon Sep 17 00:00:00 2001 From: Andreas Habel Date: Fri, 14 Nov 2008 18:28:51 +0100 Subject: Added check for database version on startup of Accountserver. The provided CreateTable.sql scripts store their versions inline of a database table. The account server checks this version number with its known compatible version. If the numbers don't match, the account server raises an error and shuts down. --- src/sql/mysql/createTables.sql | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/sql/mysql') diff --git a/src/sql/mysql/createTables.sql b/src/sql/mysql/createTables.sql index ba0cb25..7951079 100644 --- a/src/sql/mysql/createTables.sql +++ b/src/sql/mysql/createTables.sql @@ -156,6 +156,10 @@ CREATE TABLE IF NOT EXISTS `tmw_world_states` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +INSERT INTO tmw_world_states VALUES('accountserver_startup',NULL,NULL,1226042339); +INSERT INTO tmw_world_states VALUES('accountserver_version',NULL,NULL,1226042339); +INSERT INTO tmw_world_states VALUES('database_version', NULL,'1', 1226042339); + -- -- table: `tmw_guilds` -- -- cgit