-- Revert gaia:api_2018_08_08_add_cloumn_with_special from mysql

BEGIN;

ALTER TABLE `api_coupon` DROP COLUMN `groupbuy_avail`;
ALTER TABLE `api_special` DROP FOREIGN KEY `groupbuy_id_refs_id_80fec79d`;
ALTER TABLE `api_special` DROP COLUMN `groupbuy_id`;
DROP TABLE IF EXISTS `api_groupbuyspecial`;

ALTER TABLE `api_skupricerule`
DROP COLUMN `groupbuy_type`,
DROP COLUMN `groupbuy_nums`,
DROP COLUMN `groupbuy_countdown`;

ALTER TABLE `api_skupricerule` DROP INDEX `api_skupricerule_unique_index`;

-- ALTER TABLE `api_order`
-- DROP COLUMN `groupbuy_status`,
-- DROP COLUMN `join_groupbuy_team_id`;

DROP TABLE IF EXISTS `api_groupbuy_team`;
DROP TABLE IF EXISTS `api_groupbuyteam_order`;

COMMIT;
