Add sql for drop mail column 'itemtextid' and add new column 'body'.

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2010-04-11 11:35:46 +04:00
parent 0d48d3bd8c
commit c03240d79b
2 changed files with 6 additions and 1 deletions

View File

@@ -1682,7 +1682,7 @@ CREATE TABLE `mail` (
`sender` int(11) unsigned NOT NULL default '0' COMMENT 'Character Global Unique Identifier',
`receiver` int(11) unsigned NOT NULL default '0' COMMENT 'Character Global Unique Identifier',
`subject` longtext,
`itemTextId` int(11) unsigned NOT NULL default '0',
`body` longtext,
`has_items` tinyint(3) unsigned NOT NULL default '0',
`expire_time` bigint(40) NOT NULL default '0',
`deliver_time` bigint(40) NOT NULL default '0',

View File

@@ -0,0 +1,5 @@
ALTER TABLE `mail` ADD COLUMN `body` longtext CHARSET utf8 COLLATE utf8_general_ci NULL after `subject`;
UPDATE `mail` LEFT JOIN `item_text` ON `mail`.`itemtextid` = `item_text`.`id` SET `mail`.`body`=`item_text`.`text`;
DELETE item_text FROM mail, item_text WHERE mail.itemtextid = item_text.id;
ALTER TABLE `mail` DROP COLUMN `itemtextid`;