ALTER TABLE `sd_categories` ADD `abbr` VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '分类简称';
ALTER TABLE `sd_goods` ADD `color` VARCHAR(15) NOT NULL DEFAULT '#6f7070' AFTER `name`;
CREATE TABLE `sd_wo` ( `id` INT(11) NOT NULL , `order_id` VARCHAR(50) NOT NULL , `type` VARCHAR(10) NOT NULL , `content` TEXT NOT NULL , `time` TIMESTAMP NOT NULL , `ip` VARCHAR(200) NOT NULL ) ENGINE = MyISAM CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `sd_wo` ADD PRIMARY KEY( `id`);
ALTER TABLE `sd_wo` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;
CREATE TABLE `sd_wo_comment` ( `id` INT NOT NULL , `order_id` VARCHAR(50) NOT NULL , `content` TEXT NOT NULL , `time` TIMESTAMP NOT NULL , `ip` VARCHAR(50) NOT NULL ) ENGINE = MyISAM CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `sd_wo_comment` ADD `role` INT(1) NOT NULL DEFAULT '1';
ALTER TABLE `sd_wo_comment` ADD PRIMARY KEY( `id`);
ALTER TABLE `sd_wo_comment` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;
INSERT INTO `sd_set` (`id`, `set_name`, `set_value`) VALUES (3, 'open_sub', '100');
ALTER TABLE `sd_api` DROP `api_id`, DROP `api_key`;
CREATE TABLE `sd_api_site` ( `id` INT NOT NULL , `name` VARCHAR(50) NOT NULL , `api_id` VARCHAR(50) NOT NULL , `api_key` VARCHAR(50) NOT NULL ) ENGINE = MyISAM CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `sd_api_site` ADD PRIMARY KEY( `id`);
ALTER TABLE `sd_api_site` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `sd_api` ADD `site_id` VARCHAR(5) NOT NULL;
ALTER TABLE `sd_api_site` ADD `api_url` VARCHAR(255) NOT NULL;
ALTER TABLE `sd_api` DROP `api_url`;
ALTER TABLE `sd_api_site` ADD `type` INT(2) NOT NULL;
ALTER TABLE `sd_api` DROP `type`;
TRUNCATE `sd_api`;