-- dependson: None
-- model: api.models.Person
-- author: kula
-- date: 2015.09.1 14:21:00
-- description: add table api_person


CREATE TABLE `api_person` (
    `id` char(32) NOT NULL PRIMARY KEY,
    `user_id` integer NOT NULL UNIQUE,
    `phone` varchar(20) UNIQUE
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `api_person` ADD CONSTRAINT `user_id_refs_id_a124856f` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);