20.lua

main 7 lines · 406 bytes Raw
Alex Alex Commit Server upload 18/10/2026 23:38
1function onUpdateDatabase()
2 print("> Updating database to version 21 (store towns in database)")
3 db.query("CREATE TABLE IF NOT EXISTS `towns` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `posx` int(11) NOT NULL DEFAULT '0', `posy` int(11) NOT NULL DEFAULT '0', `posz` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`)) ENGINE=InnoDB")
4
5 return true
6end
7
Top