text: -- phpMyAdmin SQL Dump
  -- version 5.0.1
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Feb 07, 2020 at 09:41 PM
  -- Server version: 10.4.11-MariaDB
  -- PHP Version: 7.4.1
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  START TRANSACTION;
  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: `katalog_mobil`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `brand`
  --
  
  CREATE TABLE `brand` (
    `brand_id` int(11) NOT NULL,
    `brand_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `brand`
  --
  
  INSERT INTO `brand` (`brand_id`, `brand_name`, `created_at`, `updated_at`) VALUES
  (1, 'Toyota', NULL, NULL),
  (2, 'Honda', NULL, NULL),
  (3, 'Mitsubishi', NULL, NULL),
  (4, 'Suzuki', NULL, NULL),
  (5, 'Daihatsu', NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `failed_jobs`
  --
  
  CREATE TABLE `failed_jobs` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` int(10) UNSIGNED NOT NULL,
    `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `batch` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `migrations`
  --
  
  INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
  (1, '2014_10_12_000000_create_users_table', 1),
  (2, '2014_10_12_100000_create_password_resets_table', 1),
  (3, '2019_08_19_000000_create_failed_jobs_table', 1),
  (4, '2020_02_05_090938_create_brand_table', 1),
  (5, '2020_02_05_091301_create_type_table', 2),
  (6, '2020_02_05_091315_create_mobil_table', 3);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `mobil`
  --
  
  CREATE TABLE `mobil` (
    `mobil_id` int(11) NOT NULL,
    `mobil_no_kerangka` int(11) NOT NULL,
    `mobil_no_polisi` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `mobil_brand_id` int(11) NOT NULL,
    `mobil_type_id` int(11) NOT NULL,
    `mobil_tahun` int(11) NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `mobil`
  --
  
  INSERT INTO `mobil` (`mobil_id`, `mobil_no_kerangka`, `mobil_no_polisi`, `mobil_brand_id`, `mobil_type_id`, `mobil_tahun`, `created_at`, `updated_at`) VALUES
  (1, 1234567890, 'B 1234 CDE', 1, 1, 2011, NULL, NULL),
  (2, 123456789, 'B 9012 IJK', 1, 1, 2011, NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `type`
  --
  
  CREATE TABLE `type` (
    `type_id` int(11) NOT NULL,
    `type_brand_id` int(11) NOT NULL,
    `type_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `type`
  --
  
  INSERT INTO `type` (`type_id`, `type_brand_id`, `type_name`, `created_at`, `updated_at`) VALUES
  (1, 1, 'Avanza', NULL, NULL),
  (4, 2, 'Brio', NULL, NULL),
  (5, 3, 'Xpander', NULL, NULL),
  (7, 5, 'Sigra', NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email_verified_at` timestamp NULL DEFAULT NULL,
    `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `brand`
  --
  ALTER TABLE `brand`
    ADD PRIMARY KEY (`brand_id`);
  
  --
  -- Indexes for table `failed_jobs`
  --
  ALTER TABLE `failed_jobs`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `mobil`
  --
  ALTER TABLE `mobil`
    ADD PRIMARY KEY (`mobil_id`),
    ADD KEY `mobil_brand_id` (`mobil_brand_id`,`mobil_type_id`),
    ADD KEY `mt` (`mobil_type_id`);
  
  --
  -- Indexes for table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indexes for table `type`
  --
  ALTER TABLE `type`
    ADD PRIMARY KEY (`type_id`),
    ADD KEY `type_brand_id` (`type_brand_id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `brand`
  --
  ALTER TABLE `brand`
    MODIFY `brand_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
  
  --
  -- AUTO_INCREMENT for table `failed_jobs`
  --
  ALTER TABLE `failed_jobs`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  
  --
  -- AUTO_INCREMENT for table `mobil`
  --
  ALTER TABLE `mobil`
    MODIFY `mobil_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  
  --
  -- AUTO_INCREMENT for table `type`
  --
  ALTER TABLE `type`
    MODIFY `type_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `mobil`
  --
  ALTER TABLE `mobil`
    ADD CONSTRAINT `mb` FOREIGN KEY (`mobil_brand_id`) REFERENCES `brand` (`brand_id`),
    ADD CONSTRAINT `mt` FOREIGN KEY (`mobil_type_id`) REFERENCES `type` (`type_id`);
  
  --
  -- Constraints for table `type`
  --
  ALTER TABLE `type`
    ADD CONSTRAINT `tb` FOREIGN KEY (`type_brand_id`) REFERENCES `brand` (`brand_id`);
  COMMIT;
  
  /*!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 */;
  