 DROP TABLE IF EXISTS `patient`;
 
 CREATE TABLE `patient` (
-  `id` INTEGER NOT NULL AUTO_INCREMENT DEFAULT NOT NULL,
+  `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
   `first` VARCHAR(30) NOT NULL,
   `last` VARCHAR(30) NOT NULL,
   `email` VARCHAR(30) NOT NULL,

DROP TABLE IF EXISTS `health_log`;

CREATE TABLE `health_log` (
  `id` INTEGER NOT NULL AUTO_INCREMENT DEFAULT NOT NULL,
  `date` DATE NULL DEFAULT NULL,
  `note` VARCHAR(10000) NULL DEFAULT NULL,
  `photo_path` VARCHAR(100) NULL,
  `id_physician` INTEGER NULL DEFAULT NULL,
  `id_patient` INTEGER NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
);


-- ---
-- Globals
-- ---
DROP DATABASE IF EXISTS `Ilera`;

CREATE DATABASE `Ilera`;

USE Ilera;
-- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- SET FOREIGN_KEY_CHECKS=0;

