-- Deploy gaia:2019_11_05_add_auditattroptions to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_auditattroptions` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `name` varchar(200) NOT NULL,
    `serviceregisteritem_id` integer NOT NULL,
    `is_delete` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `update_time` datetime(6) NOT NULL
)
;
ALTER TABLE `api_auditattroptions` ADD CONSTRAINT `serviceregisteritem_id_refs_id_db3c9261` FOREIGN KEY (`serviceregisteritem_id`) REFERENCES `api_serviceregisteritem` (`id`);
CREATE INDEX `api_auditattroptions_8a7d75aa` ON `api_auditattroptions` (`serviceregisteritem_id`);

COMMIT;
