-
-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,6 @@ | ||
function onUpdateDatabase() | ||
logger.info("Updating database to version 46 (hireling)") | ||
logger.info("Updating database to version 47 (fix: creature speed and conditions)") | ||
|
||
db.query([[ | ||
CREATE TABLE IF NOT EXISTS `player_hirelings` ( | ||
`id` INT NOT NULL PRIMARY KEY auto_increment, | ||
`player_id` INT NOT NULL, | ||
`name` varchar(255), | ||
`active` tinyint unsigned NOT NULL DEFAULT '0', | ||
`sex` tinyint unsigned NOT NULL DEFAULT '0', | ||
`posx` int(11) NOT NULL DEFAULT '0', | ||
`posy` int(11) NOT NULL DEFAULT '0', | ||
`posz` int(11) NOT NULL DEFAULT '0', | ||
`lookbody` int(11) NOT NULL DEFAULT '0', | ||
`lookfeet` int(11) NOT NULL DEFAULT '0', | ||
`lookhead` int(11) NOT NULL DEFAULT '0', | ||
`looklegs` int(11) NOT NULL DEFAULT '0', | ||
`looktype` int(11) NOT NULL DEFAULT '136', | ||
FOREIGN KEY(`player_id`) REFERENCES `players`(`id`) | ||
ON DELETE CASCADE | ||
) | ||
]]) | ||
db.query("ALTER TABLE `players` MODIFY `conditions` mediumblob NOT NULL;") | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,24 @@ | ||
function onUpdateDatabase() | ||
logger.info("Updating database to version 47 (fix: creature speed and conditions)") | ||
logger.info("Updating database to version 46 (hireling)") | ||
|
||
db.query("ALTER TABLE `players` MODIFY `conditions` mediumblob NOT NULL;") | ||
end | ||
db.query([[ | ||
CREATE TABLE IF NOT EXISTS `player_hirelings` ( | ||
`id` INT NOT NULL PRIMARY KEY auto_increment, | ||
`player_id` INT NOT NULL, | ||
`name` varchar(255), | ||
`active` tinyint unsigned NOT NULL DEFAULT '0', | ||
`sex` tinyint unsigned NOT NULL DEFAULT '0', | ||
`posx` int(11) NOT NULL DEFAULT '0', | ||
`posy` int(11) NOT NULL DEFAULT '0', | ||
`posz` int(11) NOT NULL DEFAULT '0', | ||
`lookbody` int(11) NOT NULL DEFAULT '0', | ||
`lookfeet` int(11) NOT NULL DEFAULT '0', | ||
`lookhead` int(11) NOT NULL DEFAULT '0', | ||
`looklegs` int(11) NOT NULL DEFAULT '0', | ||
`looktype` int(11) NOT NULL DEFAULT '136', | ||
FOREIGN KEY(`player_id`) REFERENCES `players`(`id`) | ||
ON DELETE CASCADE | ||
) | ||
]]) | ||
end |