Skip to content

Commit

Permalink
fix: files removed by resolving conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
murilo09 committed Dec 9, 2024
1 parent c36436d commit b4dc46b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
28 changes: 27 additions & 1 deletion data-otservbr-global/migrations/47.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
function onUpdateDatabase()
return false -- true = There are others migrations file | false = this is the last migration file
logger.info("Updating database to version 48 (House Auction)")

db.query([[
ALTER TABLE `houses`
DROP `bid`,
DROP `bid_end`,
DROP `last_bid`,
DROP `highest_bidder`
]])

db.query([[
ALTER TABLE `houses`
ADD `bidder` int(11) NOT NULL DEFAULT '0',
ADD `bidder_name` varchar(255) NOT NULL DEFAULT '',
ADD `highest_bid` int(11) NOT NULL DEFAULT '0',
ADD `internal_bid` int(11) NOT NULL DEFAULT '0',
ADD `bid_end_date` int(11) NOT NULL DEFAULT '0',
ADD `state` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
ADD `transfer_status` tinyint(1) DEFAULT '0'
]])

db.query([[
ALTER TABLE `accounts`
ADD `house_bid_id` int(11) NOT NULL DEFAULT '0'
]])

return true
end
3 changes: 3 additions & 0 deletions data-otservbr-global/migrations/48.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: 1 addition & 1 deletion schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `server_config` (
CONSTRAINT `server_config_pk` PRIMARY KEY (`config`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `server_config` (`config`, `value`) VALUES ('db_version', '47'), ('motd_hash', ''), ('motd_num', '0'), ('players_record', '0');
INSERT INTO `server_config` (`config`, `value`) VALUES ('db_version', '48'), ('motd_hash', ''), ('motd_num', '0'), ('players_record', '0');

-- Table structure `accounts`
CREATE TABLE IF NOT EXISTS `accounts` (
Expand Down

0 comments on commit b4dc46b

Please sign in to comment.