-- Deploy gaia:kabalance to mysql

BEGIN;

CREATE TABLE `api_kabalance` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `merchant_id` bigint NOT NULL,
    `radio` integer NOT NULL,
    `is_online` bool NOT NULL,
    `start_time` datetime(6) NOT NULL,
    `end_time` datetime(6),
    `create_time` datetime(6) NOT NULL,
    `update_time` datetime(6) NOT NULL
)
;
ALTER TABLE `api_kabalance` ADD CONSTRAINT `merchant_id_refs_id_af4da097` FOREIGN KEY (`merchant_id`) REFERENCES `hippo_merchant` (`id`);

COMMIT;
