-- Deploy gaia:api_2018_12_17_add_some_fileds_bdtransfer_model_for_call_center to mysql

BEGIN;

-- XXX Add DDLs here.
ALTER TABLE `api_bdtransfer`
ADD COLUMN `note` longtext,
ADD COLUMN `wechat_nickname` varchar(200),
ADD COLUMN `person_id` varchar(50),
ADD COLUMN `object_state` smallint NOT NULL,
ADD COLUMN `current_follow_up_consultant_id` integer;
ALTER TABLE `api_bdtransfer_singlerecord` ADD COLUMN `appointment_time` datetime(6), ADD COLUMN `consultation_time` datetime(6);

ALTER TABLE `api_bdtransfer` ADD CONSTRAINT `current_follow_up_consultant_id_refs_id_3c01d5ed` FOREIGN KEY (`current_follow_up_consultant_id`) REFERENCES `auth_user` (`id`);
CREATE INDEX `api_bdtransfer_a7c9ab5d` ON `api_bdtransfer` (`current_follow_up_consultant_id`);
COMMIT;
