-- Deploy gaia:api_2018_10_11_add_more_reason_colum to mysql

BEGIN;

ALTER TABLE `hippo_billapplyrecord` ADD COLUMN `more_reason` longtext NULL ;

CREATE TABLE `hippo_billapplyreopenrecord` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `reopenrecords_id` integer NOT NULL,
    `create_time` datetime(6) NOT NULL,
    `status` bool NOT NULL,
    `reopen_reason` longtext,
    `express_company` integer,
    `express_id` varchar(100),
    `bill_type` integer NOT NULL,
    `bill_id` varchar(128) NOT NULL
)
;
ALTER TABLE `hippo_billapplyreopenrecord` ADD CONSTRAINT `reopenrecords_id_refs_id_88976e00` FOREIGN KEY (`reopenrecords_id`) REFERENCES `hippo_billapplyrecord` (`id`);
CREATE INDEX `hippo_billapplyreopenrecord_822b18dc` ON `hippo_billapplyreopenrecord` (`reopenrecords_id`);

COMMIT;
