CREATE TABLE `sd_spu` ( `id` INT NOT NULL , `name` VARCHAR(20) NOT NULL , `image` VARCHAR(255) NOT NULL , `sort` INT NOT NULL ) ENGINE = InnoDB CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `sd_spu` ADD PRIMARY KEY( `id`);
ALTER TABLE `sd_spu` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `sd_spu` ADD `cat` VARCHAR(20) NOT NULL;
ALTER TABLE `sd_spu` ADD INDEX( `cat`);
ALTER TABLE `sd_goodDetail` ADD `spu` VARCHAR(10) NOT NULL DEFAULT '0';
ALTER TABLE `sd_goodDetail` ADD INDEX( `spu`);
ALTER TABLE `sd_spu` ADD `updated_at` TIMESTAMP NOT NULL AFTER `sort`, ADD `created_at` TIMESTAMP NOT NULL;