20110831update.sql 594 B

123456789
  1. ALTER TABLE `characters` ADD `createDate` date NOT NULL DEFAULT '0000-00-00' AFTER `createTime`;
  2. UPDATE `characters` SET `createDate`=CURDATE() WHERE `createDate`<'2004-00-00';
  3. ALTER TABLE `characters` DROP `createTime`;
  4. ALTER TABLE `messages` CHANGE `isFourStars` `sendBySystem` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `isLocked`;
  5. ALTER TABLE `messages` CHANGE `isNews` `isReturned` enum('true','false') NOT NULL DEFAULT 'false' AFTER `sendBySystem`;
  6. -- After alter table, false is setted to 2 but should be 0
  7. UPDATE `messages` SET `sendBySystem` = 0 WHERE `sendBySystem` = 2;