-- https://www.phpmyadmin.net/
--
-- Waktu pembuatan: 27 Okt 2023 pada 03.44
-- Versi server: 10.4.18-MariaDB
-- Versi PHP: 7.4.16

START TRANSACTION;



--
-- Database: `silsilah`
--

-- --------------------------------------------------------

--
-- Struktur dari tabel `couples`
--

CREATE TABLE `couples` (
  `id` char(36) COLLATE utf8_unicode_ci NOT NULL,
  `husband_id` char(36) COLLATE utf8_unicode_ci NOT NULL,
  `wife_id` char(36) COLLATE utf8_unicode_ci NOT NULL,
  `marriage_date` date DEFAULT NULL,
  `divorce_date` date DEFAULT NULL,
  `manager_id` char(36) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data untuk tabel `couples`
--

INSERT INTO `couples` (`id`, `husband_id`, `wife_id`, `marriage_date`, `divorce_date`, `manager_id`, `created_at`, `updated_at`) VALUES
('f0265cac-7c5c-4c0a-9c95-f41c44405546', '6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', 'c920d31c-59fc-4931-b2bf-d69e7c1378c1', '2023-10-27', NULL, '6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', '2023-10-27 01:37:34', '2023-10-27 01:37:34');

-- --------------------------------------------------------

--
-- Struktur dari tabel `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data untuk tabel `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, '2017_06_27_151536_create_couples_table', 1),
(4, '2021_04_04_215601_create_user_metadata_table', 1);

-- --------------------------------------------------------

--
-- Struktur dari tabel `password_resets`
--

CREATE TABLE `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Struktur dari tabel `users`
--

CREATE TABLE `users` (
  `id` char(36) COLLATE utf8_unicode_ci NOT NULL,
  `nickname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gender_id` tinyint(1) UNSIGNED NOT NULL,
  `father_id` char(36) COLLATE utf8_unicode_ci DEFAULT NULL,
  `mother_id` char(36) COLLATE utf8_unicode_ci DEFAULT NULL,
  `parent_id` char(36) COLLATE utf8_unicode_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `yob` year(4) DEFAULT NULL,
  `birth_order` tinyint(3) UNSIGNED DEFAULT NULL,
  `dod` date DEFAULT NULL,
  `yod` year(4) DEFAULT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `photo_path` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `manager_id` char(36) COLLATE utf8_unicode_ci DEFAULT NULL,
  `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data untuk tabel `users`
--

INSERT INTO `users` (`id`, `nickname`, `name`, `gender_id`, `father_id`, `mother_id`, `parent_id`, `dob`, `yob`, `birth_order`, `dod`, `yod`, `email`, `password`, `address`, `city`, `phone`, `photo_path`, `manager_id`, `remember_token`, `created_at`, `updated_at`) VALUES
('51031088-4765-4567-84d7-d458d763a413', 'MAISAROH', 'MAISAROH', 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', NULL, '2023-10-27 01:36:47', '2023-10-27 01:36:47'),
('6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', 'LUTFI', 'LUTFI IRAWAN', 1, 'c1718e4b-91c6-4c3a-bd56-4396a74d06ba', '51031088-4765-4567-84d7-d458d763a413', 'f0265cac-7c5c-4c0a-9c95-f41c44405546', NULL, NULL, NULL, NULL, NULL, 'lutfi@gmail.com', '$2y$10$VTvLVMxC0n6IO5JDMDyxfOKb0CjCKlXbn1L.uC5Ntm6GbBMVUrgHK', NULL, NULL, NULL, NULL, '6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', NULL, '2023-10-27 01:35:56', '2023-10-27 01:43:06'),
('873cee1a-4896-4c99-a425-9f3ba70bb07e', 'NADIA KUMALA', 'NADIA KUMALA', 2, '6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', 'c920d31c-59fc-4931-b2bf-d69e7c1378c1', 'f0265cac-7c5c-4c0a-9c95-f41c44405546', NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', NULL, '2023-10-27 01:38:00', '2023-10-27 01:38:00'),
('b9ce98a0-a1ad-4f2d-b476-5f2c082b2389', 'NARA KOMARUN', 'NARA KOMARUN', 1, '6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', 'c920d31c-59fc-4931-b2bf-d69e7c1378c1', 'f0265cac-7c5c-4c0a-9c95-f41c44405546', NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', NULL, '2023-10-27 01:38:24', '2023-10-27 01:38:24'),
('c1718e4b-91c6-4c3a-bd56-4396a74d06ba', 'LUTFI IRAWA', 'LUTFI IRAWA', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', NULL, '2023-10-27 01:36:36', '2023-10-27 01:36:36'),
('c920d31c-59fc-4931-b2bf-d69e7c1378c1', 'MAIMUNAH', 'MAIMUNAH', 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '6351cab8-abf5-4fda-8b7f-4dd4d790a9c3', NULL, '2023-10-27 01:37:34', '2023-10-27 01:37:34');

-- --------------------------------------------------------

--
-- Struktur dari tabel `user_metadata`
--

CREATE TABLE `user_metadata` (
  `id` char(36) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` char(36) COLLATE utf8_unicode_ci NOT NULL,
  `key` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `value` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indeks untuk tabel `couples`
--
ALTER TABLE `couples`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `couples_husband_id_wife_id_unique` (`husband_id`,`wife_id`);

--
-- Indeks untuk tabel `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `password_resets`
--
ALTER TABLE `password_resets`
  ADD KEY `password_resets_email_index` (`email`);

--
-- Indeks untuk tabel `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`);

--
-- Indeks untuk tabel `user_metadata`
--
ALTER TABLE `user_metadata`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_metadata_user_id_foreign` (`user_id`),
  ADD KEY `user_metadata_key_index` (`key`);

--
-- AUTO_INCREMENT untuk tabel yang dibuang
--

--
-- AUTO_INCREMENT untuk tabel `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
--

--
-- Ketidakleluasaan untuk tabel `user_metadata`
--
ALTER TABLE `user_metadata`
  ADD CONSTRAINT `user_metadata_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

