-- https://www.phpmyadmin.net/
--
-- Waktu pembuatan: 10 Jul 2025 pada 02.20
-- Versi server: 10.4.27-MariaDB
-- Versi PHP: 8.2.0

START TRANSACTION;



--
-- Database: `absengurucode`
--

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

--
-- Struktur dari tabel `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Struktur dari tabel `ledgers`
--

CREATE TABLE `ledgers` (
  `id_ledger` bigint(20) UNSIGNED NOT NULL,
  `rfid` varchar(255) NOT NULL,
  `nama_siswa` varchar(255) NOT NULL,
  `id_kelas` bigint(20) UNSIGNED NOT NULL,
  `nama_kelas` varchar(255) NOT NULL,
  `id_mapel` bigint(20) UNSIGNED NOT NULL,
  `kode` varchar(255) DEFAULT NULL,
  `mata_pelajaran` varchar(255) NOT NULL,
  `id_guru` bigint(20) UNSIGNED NOT NULL,
  `nama_guru` varchar(255) NOT NULL,
  `id_daftar_soal` bigint(20) UNSIGNED NOT NULL,
  `nama_ujian` varchar(255) NOT NULL,
  `nilai` double(8,2) 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 untuk tabel `ledgers`
--

INSERT INTO `ledgers` (`id_ledger`, `rfid`, `nama_siswa`, `id_kelas`, `nama_kelas`, `id_mapel`, `kode`, `mata_pelajaran`, `id_guru`, `nama_guru`, `id_daftar_soal`, `nama_ujian`, `nilai`, `created_at`, `updated_at`) VALUES
(2, '222', 'Surya Insomnia', 6, '12 RPL', 1, 'PDS', 'Pemrograman Dasar 1', 1, 'Arief Hidayat', 3, 'UTS - Pemdas 12 2025', 28.91, '2025-04-12 22:40:01', '2025-04-12 22:40:01');

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

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

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_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_reset_tokens_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2025_02_13_053516_create_tbl_user_table', 1),
(6, '2025_02_13_081412_create_tbl_dompet_table', 1),
(7, '2025_02_13_082120_change_nominal_saldo_type_in_tbl_dompet', 1),
(8, '2025_02_13_083114_create_tbl_kelas_table', 1),
(9, '2025_02_13_230154_create_tbl_jenis_event_table', 1),
(10, '2025_02_13_232653_create_tbl_saldo_table', 1),
(11, '2025_02_14_000114_create_tbl_riwayat_tabungan_table', 1),
(12, '2025_02_17_065649_pengeluaran', 1),
(13, '2025_03_14_224738_create_tbl_mapel_table', 1),
(14, '2025_03_14_232037_create_tbl_guru_table', 1),
(15, '2025_03_14_235505_add_rfid_to_tbl_guru_table', 1),
(16, '2025_03_15_001047_create_tbl_jam_table', 1),
(17, '2025_03_15_002601_create_tbl_hari_table', 1),
(18, '2025_03_15_005234_create_tbl_jadwal_table', 1),
(19, '2025_03_17_235331_create_presensi_gurus_table', 1),
(20, '2025_03_18_113603_create_tbl_presensi_guru_table', 1),
(21, '2025_03_19_063405_create_tbl_pengaturan_table', 1),
(22, '2025_03_21_072028_create_tbl_daftar_soal_table', 1),
(23, '2025_03_21_082245_create_tbl_soal_table', 1),
(24, '2025_03_21_082656_create_tbl_pilihan_ganda_table', 1),
(25, '2025_03_23_141416_create_tbl_token_api_table', 1),
(26, '2025_03_25_065543_create_tbl_jawaban_table', 1),
(27, '2025_03_28_055556_create_token_ujians_table', 1),
(28, '2025_04_07_065844_create_ledgers_table', 1),
(29, '2025_04_12_142621_tbl_jadwals', 2),
(30, '2025_04_12_143551_add_id_mapel_to_tbl_jadwal_table', 3),
(31, '2025_04_12_152910_add_id_daftar_soal_and_hasil_isian_to_tbl_jawaban_table', 4),
(32, '2025_04_12_153344_add_kode_to_ledgers_table', 5),
(33, '2025_04_28_162243_add_jam_masuk_dan_jam_pulang_to_tbl_pengaturan', 6),
(34, '2025_04_28_165558_absentendik', 7),
(35, '2025_05_01_151325_create_tbl_tendik_table', 8),
(36, '2025_05_01_153121_add_jabatan_to_tbl_tendik_table', 9),
(37, '2025_05_01_155941_create_tbl_presensi_tendik_table', 10),
(38, '2025_05_16_144719_create_tbl_curang_table', 10);

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

--
-- Struktur dari tabel `tbl_daftar_soal`
--

CREATE TABLE `tbl_daftar_soal` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `id_kelas` bigint(20) UNSIGNED NOT NULL,
  `id_mapel` bigint(20) UNSIGNED NOT NULL,
  `id_guru` bigint(20) UNSIGNED NOT NULL,
  `nama_ujian` varchar(255) DEFAULT NULL,
  `date_start` datetime DEFAULT NULL,
  `date_end` datetime DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `is_ready` 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 untuk tabel `tbl_daftar_soal`
--

INSERT INTO `tbl_daftar_soal` (`id`, `id_kelas`, `id_mapel`, `id_guru`, `nama_ujian`, `date_start`, `date_end`, `is_active`, `is_ready`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 'UTS - Pemdas 10 2025', '2025-04-12 19:02:00', '2025-04-12 20:02:00', 1, 0, '2025-04-12 08:05:58', '2025-04-12 12:03:11'),
(2, 3, 2, 2, 'UTS - Pkn 2025', '2025-04-12 19:01:00', '2025-04-12 20:01:00', 1, 0, '2025-04-12 08:05:58', '2025-04-12 12:01:44'),
(3, 6, 1, 1, 'UTS - Pemdas 12 2025', '2025-04-12 07:00:00', '2025-04-12 08:30:00', 1, 1, '2025-04-12 08:05:58', '2025-04-12 12:03:18'),
(4, 8, 6, 3, 'test', '2025-04-22 13:51:00', '2025-04-22 13:56:00', 0, 0, '2025-04-12 08:05:58', '2025-04-22 06:51:44'),
(5, 8, 6, 3, NULL, NULL, NULL, 1, 0, '2025-05-15 23:46:01', '2025-05-15 23:46:01');

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

--
-- Struktur dari tabel `tbl_hari`
--

CREATE TABLE `tbl_hari` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `day` varchar(255) NOT NULL,
  `hari` varchar(255) 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 untuk tabel `tbl_hari`
--

INSERT INTO `tbl_hari` (`id`, `day`, `hari`, `created_at`, `updated_at`) VALUES
(1, '1', 'Senin', '2025-04-12 05:31:53', '2025-04-12 05:31:53'),
(2, '2', 'Selasa', '2025-04-12 05:32:00', '2025-04-12 05:32:00'),
(3, '3', 'Rabu', '2025-04-12 05:32:05', '2025-04-12 05:32:09'),
(4, '4', 'Kamis', '2025-04-12 05:32:15', '2025-04-12 05:32:15'),
(5, '5', 'Jumat', '2025-04-12 05:32:22', '2025-04-12 05:32:22'),
(6, '6', 'Sabtu', '2025-04-12 05:32:27', '2025-07-10 00:17:47');

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

--
-- Struktur dari tabel `tbl_jadwal`
--

CREATE TABLE `tbl_jadwal` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `id_kelas` bigint(20) UNSIGNED NOT NULL,
  `id_hari` bigint(20) UNSIGNED NOT NULL,
  `id_jam` bigint(20) UNSIGNED NOT NULL,
  `id_guru` bigint(20) UNSIGNED NOT NULL,
  `id_mapel` bigint(20) UNSIGNED 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 untuk tabel `tbl_jadwal`
--

INSERT INTO `tbl_jadwal` (`id`, `id_kelas`, `id_hari`, `id_jam`, `id_guru`, `id_mapel`, `created_at`, `updated_at`) VALUES
(2, 1, 1, 1, 1, 1, '2025-04-12 07:36:58', '2025-04-12 07:36:58'),
(3, 1, 1, 2, 1, 1, '2025-04-12 07:37:01', '2025-04-12 07:37:01'),
(4, 3, 1, 1, 2, 2, '2025-04-12 07:37:11', '2025-04-12 07:37:11'),
(5, 3, 1, 2, 2, 2, '2025-04-12 07:37:18', '2025-04-12 07:37:18'),
(6, 3, 2, 1, 2, 2, '2025-04-12 07:37:28', '2025-04-12 07:37:28'),
(7, 6, 2, 4, 1, 1, '2025-04-12 07:37:35', '2025-04-12 07:37:35'),
(8, 6, 2, 5, 1, 1, '2025-04-12 07:37:40', '2025-04-12 07:37:40'),
(9, 1, 6, 1, 1, 1, '2025-04-12 07:38:27', '2025-04-12 07:38:27'),
(10, 1, 6, 2, 1, 1, '2025-04-12 07:38:31', '2025-04-12 07:38:31'),
(11, 1, 6, 3, 1, 1, '2025-04-12 07:38:36', '2025-04-12 07:38:36'),
(12, 3, 6, 1, 2, 2, '2025-04-12 07:38:47', '2025-04-12 07:38:47');

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

--
-- Struktur dari tabel `tbl_jam`
--

CREATE TABLE `tbl_jam` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ke` varchar(255) NOT NULL,
  `jam_mulai` time NOT NULL,
  `jam_selesai` time 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 untuk tabel `tbl_jam`
--

INSERT INTO `tbl_jam` (`id`, `ke`, `jam_mulai`, `jam_selesai`, `created_at`, `updated_at`) VALUES
(1, '1', '07:30:00', '08:30:00', '2025-04-12 05:26:44', '2025-04-12 05:26:44'),
(2, '2', '08:30:00', '09:30:00', '2025-04-12 05:27:11', '2025-04-12 05:27:11'),
(3, '3', '09:30:00', '10:00:00', '2025-04-12 05:29:00', '2025-04-12 05:29:00'),
(4, '4', '10:00:00', '11:00:00', '2025-04-12 05:29:28', '2025-04-12 05:29:28'),
(5, '5', '11:00:00', '12:00:00', '2025-04-12 05:29:49', '2025-04-12 05:29:49'),
(6, '6', '12:00:00', '13:00:00', '2025-04-12 05:30:08', '2025-04-12 05:30:08'),
(7, '7', '13:00:00', '14:00:00', '2025-04-12 05:30:36', '2025-04-12 05:30:36');

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

--
-- Struktur dari tabel `tbl_kelas`
--

CREATE TABLE `tbl_kelas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `kelas` int(11) NOT NULL,
  `nama_kelas` varchar(255) NOT NULL,
  `nominal_spp` decimal(15,2) 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 untuk tabel `tbl_kelas`
--

INSERT INTO `tbl_kelas` (`id`, `kelas`, `nama_kelas`, `nominal_spp`, `created_at`, `updated_at`) VALUES
(1, 10, '10 RPL', '150000.00', '2025-04-12 05:56:46', '2025-07-10 00:19:30'),
(3, 10, '10 TKR', '0.00', '2025-04-12 06:51:55', '2025-04-12 06:51:55'),
(4, 10, '10 TKJ', '150000.00', '2025-04-12 06:52:44', '2025-04-13 05:54:18'),
(5, 11, '11 TKR', '0.00', '2025-04-12 06:52:59', '2025-04-12 06:52:59'),
(6, 12, '12 RPL', '0.00', '2025-04-12 06:53:16', '2025-04-12 06:53:16'),
(7, 12, '12 TKR', '0.00', '2025-04-12 06:53:25', '2025-04-12 06:53:25'),
(8, 0, 'KS', '0.00', '2025-04-12 07:55:06', '2025-04-12 07:55:06');

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

--
-- Struktur dari tabel `tbl_mapel`
--

CREATE TABLE `tbl_mapel` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `kode` varchar(255) NOT NULL,
  `mata_pelajaran` varchar(255) 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 untuk tabel `tbl_mapel`
--

INSERT INTO `tbl_mapel` (`id`, `kode`, `mata_pelajaran`, `created_at`, `updated_at`) VALUES
(1, 'PDS', 'Pemrograman Dasar 1', '2025-04-12 05:24:27', '2025-07-10 00:17:10'),
(2, 'PKN', 'Pendidikan Kewarganegaraan', '2025-04-12 05:24:39', '2025-04-12 05:24:39'),
(3, 'ASJ', 'Administrasi Sistem Jaringan', '2025-04-12 05:24:54', '2025-04-12 05:24:54'),
(4, 'BIG', 'Bahasa Inggris', '2025-04-12 05:25:03', '2025-04-12 05:25:03'),
(5, 'BID', 'Bahasa Indonesia', '2025-04-12 05:25:10', '2025-04-12 05:25:10');

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

--
-- Struktur dari tabel `tbl_pengaturan`
--

CREATE TABLE `tbl_pengaturan` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `maks_terlambat` int(11) NOT NULL,
  `upah_per_jam` decimal(10,2) NOT NULL,
  `jam_masuk` time DEFAULT NULL,
  `jam_pulang` time 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 untuk tabel `tbl_pengaturan`
--

INSERT INTO `tbl_pengaturan` (`id`, `maks_terlambat`, `upah_per_jam`, `jam_masuk`, `jam_pulang`, `created_at`, `updated_at`) VALUES
(4, 5, '10000.00', '06:45:00', '13:45:00', '2025-04-28 09:44:42', '2025-04-28 09:44:42');

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

--
-- Struktur dari tabel `tbl_presensi_guru`
--

CREATE TABLE `tbl_presensi_guru` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `periode_awal` date NOT NULL,
  `periode_akhir` date NOT NULL,
  `id_kelas` bigint(20) UNSIGNED NOT NULL,
  `id_hari` bigint(20) UNSIGNED NOT NULL,
  `id_jam` bigint(20) UNSIGNED NOT NULL,
  `id_guru` bigint(20) UNSIGNED NOT NULL,
  `id_mapel` bigint(20) UNSIGNED NOT NULL,
  `jam_in` time DEFAULT NULL,
  `status_in` varchar(255) NOT NULL DEFAULT 'unassig',
  `jam_out` time DEFAULT NULL,
  `status_out` varchar(255) NOT NULL DEFAULT 'unassig',
  `paid` 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;

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

--
-- Struktur dari tabel `tbl_presensi_tendik`
--

CREATE TABLE `tbl_presensi_tendik` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tanggal` date NOT NULL,
  `rfid` varchar(255) NOT NULL,
  `level` varchar(255) NOT NULL,
  `jam_masuk` time NOT NULL,
  `status_in` varchar(255) NOT NULL,
  `jam_pulang` time DEFAULT NULL,
  `status_out` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Struktur dari tabel `tbl_siswa`
--

CREATE TABLE `tbl_siswa` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nisn` varchar(255) NOT NULL,
  `rfid` varchar(255) NOT NULL,
  `nama_siswa` varchar(255) NOT NULL,
  `jenis_kelamin` enum('L','P') NOT NULL,
  `id_kelas` bigint(20) UNSIGNED NOT NULL,
  `no_whatsapp` varchar(255) DEFAULT NULL,
  `nama_wali` varchar(255) DEFAULT NULL,
  `wa_wali` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data untuk tabel `tbl_siswa`
--

INSERT INTO `tbl_siswa` (`id`, `nisn`, `rfid`, `nama_siswa`, `jenis_kelamin`, `id_kelas`, `no_whatsapp`, `nama_wali`, `wa_wali`, `is_active`, `created_at`, `updated_at`) VALUES
(1, '111', '222', 'Surya Insomnia', 'L', 1, '111', 'www', '222222', 1, '2025-04-13 00:49:00', '2025-04-13 00:49:00'),
(2, '321', '444', 'Andre Taulany', 'L', 1, '1', '2', '3', 1, '2025-04-13 00:49:00', '2025-04-13 00:49:00'),
(3, '999', '999', 'Raditya Dika', 'L', 1, '9', '9', '9', 1, '2025-04-13 00:49:00', '2025-04-13 00:49:00'),
(4, '32131', '555', 'Deddy Corbuzier', 'L', 4, '890', 'qwe', '234', 1, '2025-04-13 00:49:00', '2025-04-13 00:49:00'),
(5, '99568745123', '2635693419', 'Arief Hidayat', 'L', 4, '088219918654', 'Sagimin', '088219918654', 1, '2025-04-13 00:49:00', '2025-04-13 00:49:00'),
(6, '5555555', '111', 'Waluyo subagyo', 'L', 4, '1111', 'satuu', '111111', 1, '2025-04-13 00:49:00', '2025-04-13 00:49:00');

--
-- Indexes for dumped tables
--

--
-- Indeks untuk tabel `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indeks untuk tabel `ledgers`
--
ALTER TABLE `ledgers`
  ADD PRIMARY KEY (`id_ledger`);

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

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

--
-- Indeks untuk tabel `tbl_hari`
--
ALTER TABLE `tbl_hari`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tbl_hari_day_unique` (`day`);

--
-- Indeks untuk tabel `tbl_jadwal`
--
ALTER TABLE `tbl_jadwal`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tbl_jadwal_id_kelas_foreign` (`id_kelas`),
  ADD KEY `tbl_jadwal_id_hari_foreign` (`id_hari`),
  ADD KEY `tbl_jadwal_id_jam_foreign` (`id_jam`),
  ADD KEY `tbl_jadwal_id_guru_foreign` (`id_guru`),
  ADD KEY `tbl_jadwal_id_mapel_foreign` (`id_mapel`);

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

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

--
-- Indeks untuk tabel `tbl_mapel`
--
ALTER TABLE `tbl_mapel`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tbl_mapel_kode_unique` (`kode`);

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

--
-- Indeks untuk tabel `tbl_presensi_guru`
--
ALTER TABLE `tbl_presensi_guru`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tbl_presensi_guru_id_kelas_foreign` (`id_kelas`),
  ADD KEY `tbl_presensi_guru_id_hari_foreign` (`id_hari`),
  ADD KEY `tbl_presensi_guru_id_jam_foreign` (`id_jam`),
  ADD KEY `tbl_presensi_guru_id_guru_foreign` (`id_guru`),
  ADD KEY `tbl_presensi_guru_id_mapel_foreign` (`id_mapel`);

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

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

--
-- AUTO_INCREMENT untuk tabel yang dibuang
--

--
-- AUTO_INCREMENT untuk tabel `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT untuk tabel `ledgers`
--
ALTER TABLE `ledgers`
  MODIFY `id_ledger` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

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

--
-- AUTO_INCREMENT untuk tabel `tbl_daftar_soal`
--
ALTER TABLE `tbl_daftar_soal`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT untuk tabel `tbl_hari`
--
ALTER TABLE `tbl_hari`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT untuk tabel `tbl_jadwal`
--
ALTER TABLE `tbl_jadwal`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT untuk tabel `tbl_jam`
--
ALTER TABLE `tbl_jam`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT untuk tabel `tbl_kelas`
--
ALTER TABLE `tbl_kelas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT untuk tabel `tbl_mapel`
--
ALTER TABLE `tbl_mapel`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT untuk tabel `tbl_pengaturan`
--
ALTER TABLE `tbl_pengaturan`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT untuk tabel `tbl_presensi_guru`
--
ALTER TABLE `tbl_presensi_guru`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=72;

--
-- AUTO_INCREMENT untuk tabel `tbl_presensi_tendik`
--
ALTER TABLE `tbl_presensi_tendik`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT untuk tabel `tbl_siswa`
--
ALTER TABLE `tbl_siswa`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

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

--
-- Ketidakleluasaan untuk tabel `tbl_jadwal`
--
ALTER TABLE `tbl_jadwal`
  ADD CONSTRAINT `tbl_jadwal_id_guru_foreign` FOREIGN KEY (`id_guru`) REFERENCES `tbl_guru` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tbl_jadwal_id_hari_foreign` FOREIGN KEY (`id_hari`) REFERENCES `tbl_hari` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tbl_jadwal_id_jam_foreign` FOREIGN KEY (`id_jam`) REFERENCES `tbl_jam` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tbl_jadwal_id_kelas_foreign` FOREIGN KEY (`id_kelas`) REFERENCES `tbl_kelas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tbl_jadwal_id_mapel_foreign` FOREIGN KEY (`id_mapel`) REFERENCES `tbl_mapel` (`id`) ON DELETE CASCADE;

--
-- Ketidakleluasaan untuk tabel `tbl_presensi_guru`
--
ALTER TABLE `tbl_presensi_guru`
  ADD CONSTRAINT `tbl_presensi_guru_id_guru_foreign` FOREIGN KEY (`id_guru`) REFERENCES `tbl_guru` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tbl_presensi_guru_id_hari_foreign` FOREIGN KEY (`id_hari`) REFERENCES `tbl_hari` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tbl_presensi_guru_id_jam_foreign` FOREIGN KEY (`id_jam`) REFERENCES `tbl_jam` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tbl_presensi_guru_id_kelas_foreign` FOREIGN KEY (`id_kelas`) REFERENCES `tbl_kelas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tbl_presensi_guru_id_mapel_foreign` FOREIGN KEY (`id_mapel`) REFERENCES `tbl_mapel` (`id`) ON DELETE CASCADE;
COMMIT;

