CREATE TABLE `jamban_terapung` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `foto` json DEFAULT NULL,
  `kecamatan_id` bigint(20) UNSIGNED NOT NULL,
  `tahun` int(11) NOT NULL,
  `kegiatan_id` bigint(20) UNSIGNED NOT NULL,
  `desa_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `jamban_terapung_kecamatan_id_foreign` (`kecamatan_id`),
  KEY `jamban_terapung_kegiatan_id_foreign` (`kegiatan_id`),
  KEY `jamban_terapung_desa_id_foreign` (`desa_id`),
  CONSTRAINT `jamban_terapung_desa_id_foreign` FOREIGN KEY (`desa_id`) REFERENCES `desa` (`id`) ON DELETE CASCADE,
  CONSTRAINT `jamban_terapung_kecamatan_id_foreign` FOREIGN KEY (`kecamatan_id`) REFERENCES `kecamatan` (`id`) ON DELETE CASCADE,
  CONSTRAINT `jamban_terapung_kegiatan_id_foreign` FOREIGN KEY (`kegiatan_id`) REFERENCES `p_kegiatan` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

