text: -- phpMyAdmin SQL Dump
  -- version 4.6.4
  -- https://www.phpmyadmin.net/
  --
  -- Host: localhost
  -- Generation Time: Nov 12, 2016 at 10:27 AM
  -- Server version: 5.7.16
  -- PHP Version: 7.0.12
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET time_zone = "+00:00";
  
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  /*!40101 SET NAMES utf8mb4 */;
  
  --
  -- Database: `crossover`
  --
  CREATE DATABASE IF NOT EXISTS `lab` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
  USE `lab`;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migrations`
  --
  
  DROP TABLE IF EXISTS `migrations`;
  CREATE TABLE IF NOT EXISTS `migrations` (
    `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `batch` int(11) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `migrations`
  --
  
  INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
  (19, '2014_10_12_000000_create_users_table', 1),
  (20, '2014_10_12_100000_create_password_resets_table', 1),
  (21, '2016_11_09_135303_create_patients_table', 1),
  (22, '2016_11_10_101937_create_reports_table', 1),
  (23, '2016_11_10_132409_create_type_tests_table', 1),
  (24, '2016_11_10_132519_create_tests_table', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  DROP TABLE IF EXISTS `password_resets`;
  CREATE TABLE IF NOT EXISTS `password_resets` (
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    KEY `password_resets_email_index` (`email`),
    KEY `password_resets_token_index` (`token`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `patients`
  --
  
  DROP TABLE IF EXISTS `patients`;
  CREATE TABLE IF NOT EXISTS `patients` (
    `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `cellphone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `passcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `patients`
  --
  
  INSERT INTO `patients` (`id`, `name`, `email`, `address`, `phone`, `cellphone`, `passcode`, `created_at`, `updated_at`) VALUES
  (1, 'Eduardo de Brito Colombo', 'eduardobcolombo@gmail.com', 'Beco das Amoreiras, 64,  Canela, RS, Brazil', '+555432824470', '+555496932173', '049e4182873917e5958af6fd5eff334e', '2016-11-11 20:19:30', '2016-11-12 12:24:52'),
  (2, 'Sissa Paula Lirio Colombo', 'sissacolombo@gmail.com', 'Beco das Amoreiras, 64,  Canela, RS, Brazil', '+555432824470', '+555481122117', '967c596f477cbcebc3c1d9fbd423c0e4', '2016-11-11 20:20:04', '2016-11-12 12:25:04');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `reports`
  --
  
  DROP TABLE IF EXISTS `reports`;
  CREATE TABLE IF NOT EXISTS `reports` (
    `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `patient_id` int(10) UNSIGNED NOT NULL,
    `text` text COLLATE utf8_unicode_ci,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `reports_patient_id_foreign` (`patient_id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `reports`
  --
  
  INSERT INTO `reports` (`id`, `patient_id`, `text`, `created_at`, `updated_at`) VALUES
  (4, 1, NULL, '2016-11-12 12:25:08', '2016-11-12 12:25:08'),
  (5, 2, NULL, '2016-11-12 12:25:31', '2016-11-12 12:25:31');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tests`
  --
  
  DROP TABLE IF EXISTS `tests`;
  CREATE TABLE IF NOT EXISTS `tests` (
    `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `type_test_id` int(10) UNSIGNED NOT NULL,
    `report_id` int(10) UNSIGNED NOT NULL,
    `description` text COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `tests_type_test_id_foreign` (`type_test_id`),
    KEY `tests_report_id_foreign` (`report_id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `tests`
  --
  
  INSERT INTO `tests` (`id`, `type_test_id`, `report_id`, `description`, `created_at`, `updated_at`) VALUES
  (7, 1, 4, 'Test Ok', '2016-11-12 12:25:16', '2016-11-12 12:25:16'),
  (8, 2, 4, 'Test Ok', '2016-11-12 12:25:21', '2016-11-12 12:25:21'),
  (9, 3, 4, 'Test Ok', '2016-11-12 12:25:26', '2016-11-12 12:25:26'),
  (10, 1, 5, 'Teste Ok', '2016-11-12 12:25:37', '2016-11-12 12:25:37'),
  (11, 2, 5, 'Teste', '2016-11-12 12:25:42', '2016-11-12 12:25:42'),
  (12, 3, 5, 'Teste Ok', '2016-11-12 12:25:54', '2016-11-12 12:25:54');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `type_tests`
  --
  
  DROP TABLE IF EXISTS `type_tests`;
  CREATE TABLE IF NOT EXISTS `type_tests` (
    `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `description` text COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `type_tests`
  --
  
  INSERT INTO `type_tests` (`id`, `title`, `description`, `created_at`, `updated_at`) VALUES
  (1, 'Amiodarone level', '', '2016-11-11 20:19:18', '2016-11-12 12:23:38'),
  (2, 'Anabolic steroids', '', '2016-11-11 20:19:21', '2016-11-12 12:23:52'),
  (3, 'Legionella pneumophila serogroup 1 Ag', '', '2016-11-12 12:24:02', '2016-11-12 12:24:02');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  DROP TABLE IF EXISTS `users`;
  CREATE TABLE IF NOT EXISTS `users` (
    `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `users_email_unique` (`email`)
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `name`, `email`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
  (1, 'eduardo', 'eduardobcolombo@gmail.com', '$2y$10$A4L8PzCdaMyWUed7RVrwE.n90/IJ49azvcnMlrGEP0aS3Xi9mJ7wO', 'B8sFJTNpO9hStLTKqw1ccR31jUTwPQzgGrBATYdF9OHpzDYadQw6CUTckHDN', '2016-11-11 20:19:12', '2016-11-11 21:23:02');
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `reports`
  --
  ALTER TABLE `reports`
    ADD CONSTRAINT `reports_patient_id_foreign` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `tests`
  --
  ALTER TABLE `tests`
    ADD CONSTRAINT `tests_report_id_foreign` FOREIGN KEY (`report_id`) REFERENCES `reports` (`id`) ON DELETE CASCADE,
    ADD CONSTRAINT `tests_type_test_id_foreign` FOREIGN KEY (`type_test_id`) REFERENCES `type_tests` (`id`) ON DELETE CASCADE;
  
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  