-- Deploy gaia:api_2018_12_27_create_table_singlerecord_log to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_bdtransfer_singlerecord_log` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `singlerecord_id` integer NOT NULL,
    `status` smallint NOT NULL,
    `created_time` datetime(6) NOT NULL
)
;
ALTER TABLE `api_bdtransfer_singlerecord_log` ADD CONSTRAINT `singlerecord_id_refs_id_6398229b` FOREIGN KEY (`singlerecord_id`) REFERENCES `api_bdtransfer_singlerecord` (`id`);
CREATE INDEX `api_bdtransfer_singlerecord_log_30ab289e` ON `api_bdtransfer_singlerecord_log` (`singlerecord_id`);

COMMIT;
