text: -- phpMyAdmin SQL Dump
  -- version 5.0.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Jan 15, 2021 at 03:41 AM
  -- Server version: 10.4.14-MariaDB
  -- PHP Version: 7.4.9
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  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: `panganku`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `artikel`
  --
  
  CREATE TABLE `artikel` (
    `id_artikel` int(10) UNSIGNED NOT NULL,
    `id_user` int(10) UNSIGNED NOT NULL,
    `judul` varchar(100) NOT NULL DEFAULT 'judulnya',
    `isi` text NOT NULL DEFAULT 'isi',
    `gambar` text DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `komentar`
  --
  
  CREATE TABLE `komentar` (
    `id_komentar` int(10) UNSIGNED NOT NULL,
    `id_user` int(10) UNSIGNED NOT NULL,
    `id_resep` int(10) UNSIGNED NOT NULL,
    `komentar` text DEFAULT NULL,
    `gambar` text DEFAULT NULL,
    `created_komentar` datetime DEFAULT NULL,
    `updated_komentar` datetime DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `version` varchar(255) NOT NULL,
    `class` text NOT NULL,
    `group` varchar(255) NOT NULL,
    `namespace` varchar(255) NOT NULL,
    `time` int(11) NOT NULL,
    `batch` int(11) UNSIGNED NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `migrations`
  --
  
  INSERT INTO `migrations` (`id`, `version`, `class`, `group`, `namespace`, `time`, `batch`) VALUES
  (55, '2020-11-26-061634', 'App\\Database\\Migrations\\User', 'default', 'App', 1608555702, 1),
  (56, '2020-11-26-073541', 'App\\Database\\Migrations\\Resep', 'default', 'App', 1608555702, 1),
  (57, '2020-11-26-084222', 'App\\Database\\Migrations\\Komentar', 'default', 'App', 1608555704, 1),
  (58, '2020-11-26-091849', 'App\\Database\\Migrations\\Artikel', 'default', 'App', 1608555705, 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `resep`
  --
  
  CREATE TABLE `resep` (
    `id_resep` int(10) UNSIGNED NOT NULL,
    `id_user` int(10) UNSIGNED NOT NULL,
    `judul` varchar(50) NOT NULL DEFAULT 'judul_resep',
    `porsi` varchar(20) NOT NULL DEFAULT '1 Orang',
    `lama_memasak` varchar(20) NOT NULL DEFAULT '30 Menit',
    `bahan` text NOT NULL,
    `tutorial` text NOT NULL,
    `gambar_banner` text NOT NULL DEFAULT 'img/default.jpg',
    `gambar_tutorial` text DEFAULT NULL,
    `created_resep` datetime DEFAULT NULL,
    `updated_resep` datetime DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `id_user` int(10) UNSIGNED NOT NULL,
    `username` varchar(20) NOT NULL DEFAULT 'nama_pengguna',
    `nama_lengkap` varchar(50) NOT NULL DEFAULT 'Nama_Lengkap',
    `email` varchar(50) NOT NULL DEFAULT 'Email',
    `password` varchar(255) NOT NULL DEFAULT 'Password',
    `jenis_kelamin` varchar(1) NOT NULL,
    `alamat` text DEFAULT NULL,
    `gambar_profile` varchar(255) DEFAULT 'img/default.jpg',
    `bio` varchar(255) DEFAULT 'img/default.jpg',
    `is_admin` varchar(1) DEFAULT 'N',
    `created_at` datetime DEFAULT NULL,
    `updated_at` datetime DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`id_user`, `username`, `nama_lengkap`, `email`, `password`, `jenis_kelamin`, `alamat`, `gambar_profile`, `bio`, `is_admin`, `created_at`, `updated_at`) VALUES
  (1, 'haris2703', 'haris', 'haris2703@gmail.com', '$2y$10$yU5pe6jP33SLU6XxrVQji.xX8.GEYtlquJB1F2MS216ziQ6yKH79.', 'L', 'cibinong', '1608949728_c503c4e146243fc3d1d8.jpg', 'bogor', 'Y', '2020-12-26 09:28:49', '2020-12-26 09:28:49');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `artikel`
  --
  ALTER TABLE `artikel`
    ADD PRIMARY KEY (`id_artikel`),
    ADD KEY `artikel_id_user_foreign` (`id_user`);
  
  --
  -- Indexes for table `komentar`
  --
  ALTER TABLE `komentar`
    ADD PRIMARY KEY (`id_komentar`),
    ADD KEY `komentar_id_user_foreign` (`id_user`),
    ADD KEY `komentar_id_resep_foreign` (`id_resep`);
  
  --
  -- Indexes for table `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `resep`
  --
  ALTER TABLE `resep`
    ADD PRIMARY KEY (`id_resep`),
    ADD KEY `resep_id_user_foreign` (`id_user`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`id_user`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `artikel`
  --
  ALTER TABLE `artikel`
    MODIFY `id_artikel` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `komentar`
  --
  ALTER TABLE `komentar`
    MODIFY `id_komentar` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;
  
  --
  -- AUTO_INCREMENT for table `resep`
  --
  ALTER TABLE `resep`
    MODIFY `id_resep` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
    MODIFY `id_user` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `artikel`
  --
  ALTER TABLE `artikel`
    ADD CONSTRAINT `artikel_id_user_foreign` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
  
  --
  -- Constraints for table `komentar`
  --
  ALTER TABLE `komentar`
    ADD CONSTRAINT `komentar_id_resep_foreign` FOREIGN KEY (`id_resep`) REFERENCES `resep` (`id_resep`) ON DELETE CASCADE ON UPDATE CASCADE,
    ADD CONSTRAINT `komentar_id_user_foreign` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
  
  --
  -- Constraints for table `resep`
  --
  ALTER TABLE `resep`
    ADD CONSTRAINT `resep_id_user_foreign` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
  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 */;
  