-- Deploy gaia:2016_07_11_add_error_code to mysql

BEGIN;

ALTER TABLE `pay_wechatrefund` ADD COLUMN `err_code` VARCHAR(30) NOT NULL;
ALTER TABLE `api_refundorder` ADD COLUMN `error` BOOL NOT NULL;
ALTER TABLE `api_cashbackorder` ADD COLUMN  `error` BOOL NOT NULL;

ALTER TABLE `pay_wechatrefund` DROP PRIMARY KEY;
ALTER TABLE `pay_wechatrefund` ADD COLUMN `id` INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY;

COMMIT;