Skip to content

Commit

Permalink
Add missing table of myaac to guilds (opentibiabr#2542)
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas authored Apr 27, 2021
1 parent 527d5da commit 7fdd81f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
9 changes: 6 additions & 3 deletions data/migrations/17.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
function onUpdateDatabase()
return false -- true = There are others migrations file | false = this is the last migration file
end
function onUpdateDatabase()
Spdlog.info("Updating database to version 18 (Fix guild creation myaac)")
db.query("ALTER TABLE `guilds` ADD `level` int(11) NOT NULL DEFAULT 1")
db.query("ALTER TABLE `guilds` ADD `points` int(11) NOT NULL DEFAULT 0")
return true
end
3 changes: 3 additions & 0 deletions data/migrations/18.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function onUpdateDatabase()
return false -- true = There are others migrations file | false = this is the last migration file
end
2 changes: 2 additions & 0 deletions schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,14 @@ CREATE TABLE IF NOT EXISTS `global_storage` (

CREATE TABLE IF NOT EXISTS `guilds` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`level` int(11) NOT NULL DEFAULT '1',
`name` varchar(255) NOT NULL,
`ownerid` int(11) NOT NULL,
`creationdata` int(11) NOT NULL,
`motd` varchar(255) NOT NULL DEFAULT '',
`residence` int(11) NOT NULL DEFAULT '0',
`balance` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
`points` int(11) NOT NULL DEFAULT '0',
CONSTRAINT `guilds_pk` PRIMARY KEY (`id`),
CONSTRAINT `guilds_name_unique` UNIQUE (`name`),
CONSTRAINT `guilds_owner_unique` UNIQUE (`ownerid`),
Expand Down

0 comments on commit 7fdd81f

Please sign in to comment.