-- Revert gaia:api_2016_10_12_create_table_api_tickets from mysql

BEGIN;

ALTER TABLE `api_singlerecord` DROP FOREIGN KEY `create_user_id_refs_id_4dd58695`;
ALTER TABLE `api_singlerecord` DROP COLUMN `create_user_id`;
ALTER TABLE `api_singlerecord` DROP FOREIGN KEY `tickets_id_refs_id_d5905384`;
ALTER TABLE `api_singlerecord` DROP COLUMN `tickets_id`;
ALTER TABLE `api_singlerecord` DROP FOREIGN KEY `order_id_refs_id_b4f31fde`;
ALTER TABLE `api_singlerecord` DROP COLUMN `order_id`;
ALTER TABLE `api_singlerecord` DROP COLUMN `is_revoke`;
ALTER TABLE `api_singlerecord` DROP COLUMN `tickets_time`;

ALTER TABLE `api_service` DROP FOREIGN KEY `tickets_result_id_refs_id_082fc5cb`;
ALTER TABLE `api_service` DROP COLUMN `tickets_result_id`;

DROP TABLE `api_ticketsresultdetail`;
DROP TABLE `api_ticketsresultrecord`;
DROP TABLE `api_tickets`;
DROP TABLE `api_ticketsresult`;

COMMIT;
