-- Deploy gaia:api_2016_10_18_add_packageserviceremark to mysql

BEGIN;

CREATE TABLE `api_packageserviceremark` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `person_id` char(32) NOT NULL,
    `remark` varchar(500) NOT NULL,
    `service_id` integer NOT NULL,
    `created_time` datetime(6)
)
;
ALTER TABLE `api_packageserviceremark` ADD CONSTRAINT `person_id_refs_id_e24b722a` FOREIGN KEY (`person_id`) REFERENCES `api_person` (`id`);
ALTER TABLE `api_packageserviceremark` ADD CONSTRAINT `service_id_refs_id_eb0f7582` FOREIGN KEY (`service_id`) REFERENCES `api_service` (`id`);

ALTER TABLE api_servicereviewrecord ADD COLUMN `explanation`varchar(1000) CHARACTER SET utf8mb4;
ALTER TABLE api_servicereviewrecord ADD COLUMN `audit_time` datetime(6);
ALTER TABLE api_servicereviewrecord ADD COLUMN `operator_id` char(32);

COMMIT;
