-- Revert gaia:user_1647_coupon from mysql

BEGIN;

ALTER TABLE `api_couponinfo` DROP FOREIGN KEY `relation_id_refs_id_ceb17fdf`, DROP COLUMN `start_time`, DROP COLUMN `end_time`, DROP COLUMN `relation_id`;
DROP TABLE `api_coupondoctorrestrict`;
DROP TABLE `api_couponspecialrestrict`;
ALTER TABLE  `api_coupongift` DROP COLUMN `created_time`, DROP COLUMN `updated_time`, DROP COLUMN `start_time`, DROP COLUMN `end_time`, DROP COLUMN `memo`;
ALTER TABLE `api_coupon` DROP COLUMN `is_doctor_new`, DROP COLUMN `discount_limit`, DROP COLUMN `has_threshold`,DROP COLUMN  `prepay_threshold`, DROP COLUMN `seckill_avail`, DROP COLUMN `created_time`, DROP COLUMN `updated_time`,DROP COLUMN  `activated_time`,
DROP COLUMN `time_type`, DROP COLUMN  `countdown`;
DROP TABLE `api_channelgiftuserrelation`;
DROP TABLE `api_giftchannellaunch`;
DROP TABLE `api_channelgift`;
ALTER TABLE `api_business_channel` DROP COLUMN `memo`, DROP COLUMN `activated_time`, DROP COLUMN `created_time`;

COMMIT;