text: -- phpMyAdmin SQL Dump
  -- version 5.0.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Jul 29, 2021 at 06:32 AM
  -- Server version: 10.4.14-MariaDB
  -- PHP Version: 7.4.10
  
  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: `perpustakaan`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `books`
  --
  
  CREATE TABLE `books` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `isbn` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `judul_buku` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `jenis_buku` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
    `jumlah_halaman` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
    `jumlah_buku` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
    `tahun_terbit` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
    `penerbit` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `pengarang` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `namephoto` varchar(191) 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 `books`
  --
  
  INSERT INTO `books` (`id`, `isbn`, `judul_buku`, `jenis_buku`, `jumlah_halaman`, `jumlah_buku`, `tahun_terbit`, `penerbit`, `pengarang`, `namephoto`, `created_at`, `updated_at`) VALUES
  (1, '123456', 'Ketika Cinta Bertasbih', 'Novel', '412', '10', '2008-03-12', 'Republika', 'Habiburrahman El Shirazy', 'KCB.jpg', '2021-07-12 21:00:08', '2021-07-12 21:00:08'),
  (2, '412031', 'Matematika', 'Pendidikan', '230', '20', '2012-08-27', 'Pustaka Widyatama', 'Nikenasih Binatari', 'mtk.jpg', '2021-07-12 21:01:13', '2021-07-12 21:01:13');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `book_returns`
  --
  
  CREATE TABLE `book_returns` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `member_id` bigint(20) UNSIGNED NOT NULL,
    `book_id` bigint(20) UNSIGNED NOT NULL,
    `tgl_peminjaman` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `kd_transaksi` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `temp` 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 `book_returns`
  --
  
  INSERT INTO `book_returns` (`id`, `member_id`, `book_id`, `tgl_peminjaman`, `kd_transaksi`, `temp`, `created_at`, `updated_at`) VALUES
  (2, 1, 1, '2021-07-29 04:24:47', '123', '2', '2021-07-28 21:25:32', '2021-07-28 21:25:32');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `failed_jobs`
  --
  
  CREATE TABLE `failed_jobs` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `uuid` varchar(191) COLLATE utf8mb4_unicode_ci 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 `members`
  --
  
  CREATE TABLE `members` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `kd_member` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `nm_member` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `jurusan` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
    `kelas` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
    `tanggal_lahir` date NOT NULL,
    `gender` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
    `nohp` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
    `alamat` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
    `namephoto` varchar(191) 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 `members`
  --
  
  INSERT INTO `members` (`id`, `kd_member`, `nm_member`, `jurusan`, `kelas`, `tanggal_lahir`, `gender`, `nohp`, `alamat`, `namephoto`, `created_at`, `updated_at`) VALUES
  (1, '2019102008', 'Ahmad Nursyifa', 'IPA', '12A', '2001-03-12', 'Laki-laki', '087543456678', 'Dukuputang', 'syifa.PNG', '2021-07-12 20:53:38', '2021-07-12 20:53:38'),
  (2, '2019102005', 'Aldi Irianto', 'IPA', '12A', '2000-03-14', 'Laki-Laki', '085221674235', 'Kuningan', 'aldi.PNG', '2021-07-12 20:54:51', '2021-07-12 20:55:28'),
  (3, '2019102006', 'Dimas Ifan Hidayat', 'IPS', '12B', '2001-03-20', 'Laki-laki', '082134567891', 'Kuningan', 'dimas.PNG', '2021-07-12 20:57:07', '2021-07-12 20:57:07');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` int(10) UNSIGNED NOT NULL,
    `migration` varchar(191) 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
  (8, '2014_10_12_000000_create_users_table', 1),
  (9, '2014_10_12_100000_create_password_resets_table', 1),
  (10, '2019_08_19_000000_create_failed_jobs_table', 1),
  (11, '2021_06_22_122104_create_books_table', 1),
  (12, '2021_06_24_124626_create_members_table', 1),
  (13, '2021_07_02_130152_create_transactions_table', 1),
  (14, '2021_07_07_143129_create_book_returns_table', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `token` varchar(191) 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 `transactions`
  --
  
  CREATE TABLE `transactions` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `member_id` bigint(20) UNSIGNED NOT NULL,
    `book_id` bigint(20) UNSIGNED NOT NULL,
    `kd_transaksi` 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;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email_verified_at` timestamp NULL DEFAULT NULL,
    `password` varchar(191) 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;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
  (2, 'SUSAN YULIANTI', 'susanyulianty17@gmail.com', NULL, '$2y$10$bstdttgLMm8eOGLlUkupqO0K/CestpHLd6Dj2105exSNLaJjfc2S6', NULL, '2021-07-28 21:20:55', '2021-07-28 21:20:55');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `books`
  --
  ALTER TABLE `books`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `book_returns`
  --
  ALTER TABLE `book_returns`
    ADD PRIMARY KEY (`id`),
    ADD KEY `book_returns_member_id_foreign` (`member_id`),
    ADD KEY `book_returns_book_id_foreign` (`book_id`);
  
  --
  -- Indexes for table `failed_jobs`
  --
  ALTER TABLE `failed_jobs`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);
  
  --
  -- Indexes for table `members`
  --
  ALTER TABLE `members`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indexes for table `transactions`
  --
  ALTER TABLE `transactions`
    ADD PRIMARY KEY (`id`),
    ADD KEY `transactions_member_id_foreign` (`member_id`),
    ADD KEY `transactions_book_id_foreign` (`book_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 `books`
  --
  ALTER TABLE `books`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `book_returns`
  --
  ALTER TABLE `book_returns`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `failed_jobs`
  --
  ALTER TABLE `failed_jobs`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `members`
  --
  ALTER TABLE `members`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  
  --
  -- AUTO_INCREMENT for table `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
  
  --
  -- AUTO_INCREMENT for table `transactions`
  --
  ALTER TABLE `transactions`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `book_returns`
  --
  ALTER TABLE `book_returns`
    ADD CONSTRAINT `book_returns_book_id_foreign` FOREIGN KEY (`book_id`) REFERENCES `books` (`id`),
    ADD CONSTRAINT `book_returns_member_id_foreign` FOREIGN KEY (`member_id`) REFERENCES `members` (`id`);
  
  --
  -- Constraints for table `transactions`
  --
  ALTER TABLE `transactions`
    ADD CONSTRAINT `transactions_book_id_foreign` FOREIGN KEY (`book_id`) REFERENCES `books` (`id`),
    ADD CONSTRAINT `transactions_member_id_foreign` FOREIGN KEY (`member_id`) REFERENCES `members` (`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 */;
  