-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `arsip`
--

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

--
-- Table structure for table `imigrans`
--

CREATE TABLE `imigrans` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `no_permohonan` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nama` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `jenis_permohonan` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tgl_lahir` date NOT NULL,
  `no_arsip` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL,
  `kewarganegaraan` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `negara` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `imigrans`
--

INSERT INTO `imigrans` (`id`, `no_permohonan`, `nama`, `jenis_permohonan`, `status`, `tgl_lahir`, `no_arsip`, `kewarganegaraan`, `negara`, `created_at`, `updated_at`, `deleted_at`) VALUES
(56, '123456789012345', 'Eviet', 'Penggantian', 'Paspor Biasa 48', '2020-12-16', '12', 'WNI', 'Indonesia', '2020-12-12 17:00:00', '2020-12-14 19:24:14', '2020-12-14 19:24:14'),
(57, '123456789011111', 'xixixi', 'Penggantian Rusak Proses', 'E-Paspor 48', '1998-11-16', '16', 'WNI', 'Indonesia', '2020-12-13 17:00:00', '2020-12-13 18:50:41', NULL),
(58, '123456789011115', 'evietamala', 'REP TK', NULL, '1998-11-16', '14', 'WNA', 'korea', '2020-12-13 17:00:00', '2020-12-13 19:02:23', NULL),
(59, '123456789011116', 'mas', 'Pilih Jenis Permohonan', 'Pilih Jenis Paspor', '2020-12-12', '4', 'WNI', 'Indonesia', '2020-12-13 17:00:00', '2020-12-13 19:14:18', NULL),
(60, '123456789011119', 'gak', 'Penggantian Rusak Proses', 'E-Paspor 48', '2000-12-17', '6', 'WNI', 'Indonesia', '2020-12-13 17:00:00', '2020-12-13 19:19:04', NULL),
(61, '123456789011113', 'rudy', 'Pilih Jenis Permohonan', NULL, '2020-12-01', '18-23134', 'WNA', 'korea', '2020-12-13 19:43:36', '2020-12-13 19:48:50', '2020-12-13 19:48:50'),
(62, '1234567890111', 'iiiii', 'Penggantian Rusak', 'Paspor Biasa 48', '1998-05-30', '12', 'WNI', 'Indonesia', '2020-12-13 19:57:03', '2020-12-13 19:57:03', NULL),
(63, '123456789011117', 'Wahyoe', 'Penggantian Rusak Proses', 'E-Paspor 48', '1998-11-16', '124567890', 'WNI', 'Indonesia', '2020-12-14 01:08:19', '2020-12-14 18:34:47', '2020-12-14 18:34:47'),
(64, '12345678901123', 'Eviek', 'Lain-lain', 'E-Paspor 48', '1998-11-16', '1762', 'WNI', 'Indonesia', '2020-12-14 18:34:27', '2020-12-14 18:36:52', '2020-12-14 18:36:52'),
(66, '12345678901113', 'evietamala', 'REP TK', NULL, '1998-11-16', '123', 'WNA', 'korea', '2020-12-14 18:44:04', '2020-12-14 18:51:37', NULL);

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

--
-- Table structure for table `loans`
--

CREATE TABLE `loans` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `imigran_id` bigint(20) UNSIGNED NOT NULL,
  `nama_peminjam` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `seksi` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tgl_keluar` date NOT NULL,
  `no_arsip` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `loans`
--

INSERT INTO `loans` (`id`, `imigran_id`, `nama_peminjam`, `seksi`, `tgl_keluar`, `no_arsip`, `created_at`, `updated_at`) VALUES
(13, 57, 'pak maulid', 'TIKIM', '2020-12-15', '16', '2020-12-15 04:04:34', NULL),
(14, 58, 'iqbal', 'sekal', '2020-12-15', '14', '2020-12-15 06:54:20', NULL);

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

--
-- 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, '2020_10_10_025929_create_imigrans_table', 1),
(3, '2020_10_26_115552_create_loans_table', 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `imigrans`
--
ALTER TABLE `imigrans`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `no_permohonan` (`no_permohonan`);

--
-- Indexes for table `loans`
--
ALTER TABLE `loans`
  ADD PRIMARY KEY (`id`),
  ADD KEY `loans_imigran_id_foreign` (`imigran_id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `imigrans`
--
ALTER TABLE `imigrans`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=68;

--
-- AUTO_INCREMENT for table `loans`
--
ALTER TABLE `loans`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `loans`
--
ALTER TABLE `loans`
  ADD CONSTRAINT `loans_imigran_id_foreign` FOREIGN KEY (`imigran_id`) REFERENCES `imigrans` (`id`);
COMMIT;

