-- Deploy gaia:api_2015_11_24_update_settlement_coupon_foreign_key to mysql

BEGIN;

ALTER TABLE `api_settlement` DROP FOREIGN KEY `api_settlement_ref_coupon_id`;
ALTER TABLE `api_settlement` ADD CONSTRAINT `api_settlement_ref_coupon_id` FOREIGN KEY (`coupon_id`) REFERENCES `api_couponinfo` (`id`);

COMMIT;
