-- Deploy gaia:api_2016_03_16_create_table_doctoraccount to mysql

BEGIN;

  CREATE TABLE `api_doctoraccount` (
      `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
      `doctor_id` varchar(100) NOT NULL,
      `country_id`  varchar(40),
      `province_id` varchar(40),
      `city_id` varchar(40),
      `bank` varchar(30) NOT NULL,
      `account_name` varchar(30) NOT NULL,
      `account_number` varchar(50) NOT NULL
  )
  ;
  ALTER TABLE `api_doctoraccount` ADD CONSTRAINT `province_id_refs_id_164a7050` FOREIGN KEY (`province_id`) REFERENCES `api_province` (`id`);
  ALTER TABLE `api_doctoraccount` ADD CONSTRAINT `city_id_refs_id_c2196dd8` FOREIGN KEY (`city_id`) REFERENCES `api_city` (`id`);
  ALTER TABLE `api_doctoraccount` ADD CONSTRAINT `doctor_id_refs_id_4a5d278c` FOREIGN KEY (`doctor_id`) REFERENCES `api_doctor` (`id`);
  ALTER TABLE `api_doctoraccount` ADD CONSTRAINT `country_id_refs_id` FOREIGN KEY (`country_id`) REFERENCES `api_country` (`id`);

COMMIT;
