-- Deploy gaia:hippo_2017_12_14_add_rechangbill to mysql

BEGIN;

ALTER TABLE `hippo_billapplyrecord` ADD COLUMN `category` integer NOT NULL DEFAULT 0;
CREATE TABLE `hippo_billtoadrechange` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `billapplyrecord_id` integer NOT NULL,
    `adrechange_id` integer NOT NULL,
    `created_time` datetime(6) NOT NULL
);
ALTER TABLE `hippo_billtoadrechange` ADD CONSTRAINT `billapplyrecord_id_refs_id_233228ed` FOREIGN KEY (`billapplyrecord_id`) REFERENCES `hippo_billapplyrecord` (`id`);

COMMIT;
