Skip to content
Snippets Groups Projects
Commit 523781b0 authored by MELERIX's avatar MELERIX
Browse files

BETA: SQL Fixes for [9616].

 * Formatted SQL tables.
 * Fixed SQL Update (it should be line by line, otherwise if one change fail the others are not executed).
parent ef736d8f
No related branches found
No related tags found
No related merge requests found
CREATE TABLE IF NOT EXISTS `castle_doorupgrade` (
`doorId` INT(11) NOT NULL DEFAULT 0,
`ratio` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
`castleId` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`doorId`)
`doorId` int(8) unsigned NOT NULL DEFAULT '0',
`ratio` tinyint(3) unsigned NOT NULL DEFAULT '0',
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`doorId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
\ No newline at end of file
CREATE TABLE IF NOT EXISTS `castle_trapupgrade` (
`castleId` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
`towerIndex` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
`level` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`towerIndex`, `castleId`)
`castleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
`towerIndex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`towerIndex`,`castleId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
\ No newline at end of file
ALTER TABLE `castle_doorupgrade`
CHANGE COLUMN `hp` `ratio` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `doorId`,
CHANGE COLUMN `pDef` `castleId` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `ratio`,
DROP COLUMN `mDef`;
\ No newline at end of file
ALTER TABLE `castle_doorupgrade` MODIFY COLUMN `doorId` int(8) unsigned NOT NULL DEFAULT '0';
ALTER TABLE `castle_doorupgrade` CHANGE COLUMN `hp` `ratio` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `doorId`;
ALTER TABLE `castle_doorupgrade` CHANGE COLUMN `pDef` `castleId` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ratio`;
ALTER TABLE `castle_doorupgrade` DROP COLUMN `mDef`;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment