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

START TRANSACTION;



--
-- Database: `mazaya`
--

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

--
-- Table structure for table `additionals`
--

CREATE TABLE `additionals` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `location_id` bigint 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 for table `additionals`
--

INSERT INTO `additionals` (`id`, `name`, `price`, `location_id`, `created_at`, `updated_at`) VALUES
(2, 'Bagasi', 500000.00, 1, '2024-08-19 23:11:57', '2024-08-19 23:28:50'),
(3, 'Tiket kereta cepat', 50000.00, 3, '2024-09-20 05:34:42', '2024-09-20 05:34:42'),
(4, 'Snackbox', 15000.00, 3, '2024-09-20 05:35:03', '2024-09-20 05:35:03'),
(5, 'Tour leader', 1000000.00, 3, '2024-09-20 05:35:20', '2024-09-20 05:35:20');

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

--
-- Table structure for table `currency_conversions`
--

CREATE TABLE `currency_conversions` (
  `id` bigint UNSIGNED NOT NULL,
  `currency` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `exchange_rate_rupiah` decimal(10,2) NOT NULL,
  `date` date 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 `currency_conversions`
--

INSERT INTO `currency_conversions` (`id`, `currency`, `name`, `exchange_rate_rupiah`, `date`, `created_at`, `updated_at`) VALUES
(1, 'USD', 'United States Dollar', 15600.00, '2024-08-15', '2024-08-14 23:32:23', '2024-08-14 23:32:23'),
(2, 'AED', 'United Arab Emirates Dirham', 5000.00, '2024-08-15', '2024-08-14 23:33:45', '2024-08-19 22:35:11');

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

--
-- Table structure for table `departures`
--

CREATE TABLE `departures` (
  `id` bigint UNSIGNED NOT NULL,
  `departure_date` date NOT NULL,
  `return_date` date NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `departure_id` bigint UNSIGNED NOT NULL,
  `destination_id` bigint 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 for table `departures`
--

INSERT INTO `departures` (`id`, `departure_date`, `return_date`, `price`, `departure_id`, `destination_id`, `created_at`, `updated_at`) VALUES
(2, '2024-08-17', '2024-08-27', 4500000.00, 6, 4, '2024-08-16 16:56:10', '2024-08-16 17:14:17'),
(3, '2024-08-17', '2024-08-30', 500000.00, 5, 2, '2024-08-16 17:01:49', '2024-08-16 17:13:17'),
(5, '2024-08-20', '2024-08-30', 1500000.00, 6, 4, '2024-08-19 20:43:20', '2024-08-19 20:43:20');

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

--
-- Table structure for table `document_types`
--

CREATE TABLE `document_types` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) 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 `document_types`
--

INSERT INTO `document_types` (`id`, `name`, `created_at`, `updated_at`) VALUES
(3, 'KTP', '2024-08-19 21:33:24', '2024-08-19 21:33:24'),
(4, 'VISA', '2024-09-20 05:37:56', '2024-09-20 05:37:56'),
(5, 'KK', '2024-09-20 05:38:03', '2024-09-20 05:38:03');

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `uuid` varchar(255) 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 `hotels`
--

CREATE TABLE `hotels` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `rating` int NOT NULL,
  `location_id` bigint 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 for table `hotels`
--

INSERT INTO `hotels` (`id`, `name`, `rating`, `location_id`, `created_at`, `updated_at`) VALUES
(4, 'RS Hermina', 4, 5, '2024-08-20 00:21:25', '2024-08-20 00:21:25'),
(5, 'Hotel Victoria', 5, 5, '2024-08-20 00:30:21', '2024-08-20 00:30:21'),
(6, 'Hotel Atmaja', 5, 1, '2024-09-20 05:09:42', '2024-09-20 05:09:42'),
(7, 'Hotel Cemerlang', 5, 3, '2024-09-20 06:55:20', '2024-09-20 06:55:20');

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

--
-- Table structure for table `hotel_rooms`
--

CREATE TABLE `hotel_rooms` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `hotel_id` bigint 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 for table `hotel_rooms`
--

INSERT INTO `hotel_rooms` (`id`, `name`, `price`, `hotel_id`, `created_at`, `updated_at`) VALUES
(2, 'Kelas 1', 500000.00, 4, '2024-08-20 00:21:25', '2024-08-20 00:21:25'),
(3, 'VIP', 1000000.00, 5, '2024-08-20 00:30:21', '2024-08-20 00:30:21'),
(4, 'Standard', 500000.00, 5, '2024-08-20 00:30:21', '2024-08-20 00:30:21'),
(5, 'Standard', 1000000.00, 6, '2024-09-20 05:09:42', '2024-09-20 05:09:42'),
(6, 'VIP', 5000000.00, 7, '2024-09-20 06:55:20', '2024-09-20 06:55:20');

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

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint UNSIGNED NOT NULL,
  `reserved_at` int UNSIGNED DEFAULT NULL,
  `available_at` int UNSIGNED NOT NULL,
  `created_at` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `locations`
--

CREATE TABLE `locations` (
  `id` bigint UNSIGNED NOT NULL,
  `city` varchar(255) 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 `locations`
--

INSERT INTO `locations` (`id`, `city`, `created_at`, `updated_at`) VALUES
(1, 'Balikpapan', '2024-08-14 23:34:13', '2024-08-14 23:34:13'),
(2, 'Mekkah', '2024-08-14 23:41:53', '2024-08-14 23:41:53'),
(3, 'Madinah', '2024-08-14 23:41:58', '2024-08-14 23:41:58'),
(4, 'DKI Jakarta', '2024-08-14 23:42:03', '2024-08-14 23:42:51'),
(5, 'Samarinda', '2024-08-14 23:42:10', '2024-08-16 16:32:23'),
(6, 'Bontang', '2024-08-16 16:32:31', '2024-08-16 16:32:31');

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2024_08_12_025349_create_currency_conversions_table', 1),
(5, '2024_08_12_030334_create_locations_table', 1),
(6, '2024_08_12_030410_create_hotels_table', 1),
(7, '2024_08_12_030843_create_hotel_rooms_table', 1),
(8, '2024_08_12_031013_create_document_types_table', 1),
(9, '2024_08_12_031039_create_additional_table', 1),
(10, '2024_08_12_031139_create_vehicles_table', 1),
(11, '2024_08_12_031331_create_departures_table', 1),
(12, '2024_08_15_053621_add_date_to_currency_table', 1),
(13, '2024_08_15_062838_drop_country_column', 1),
(14, '2024_08_15_072244_add_name_column_currency', 1),
(15, '2024_08_20_055844_rename_additional', 2),
(16, '2024_09_20_124623_create_packages_table', 3),
(17, '2024_09_20_141906_add_description_to_packages', 4),
(18, '2024_09_20_143858_add_total_price_to_package', 5),
(19, '2024_09_20_175755_add_modal_price_to_package', 6),
(20, '2024_09_20_182757_add_default_to_total_price', 7),
(21, '2024_09_20_182859_add_default_to_modal_price', 8);

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

--
-- Table structure for table `packages`
--

CREATE TABLE `packages` (
  `id` bigint UNSIGNED NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `total_price` int NOT NULL DEFAULT '0',
  `modal_price` int NOT NULL DEFAULT '0',
  `pax` int UNSIGNED NOT NULL,
  `departure_date` date NOT NULL,
  `return_date` date NOT NULL,
  `departure_location_id` bigint UNSIGNED NOT NULL,
  `vehicle_id` bigint UNSIGNED 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 `packages`
--

INSERT INTO `packages` (`id`, `description`, `total_price`, `modal_price`, `pax`, `departure_date`, `return_date`, `departure_location_id`, `vehicle_id`, `created_at`, `updated_at`) VALUES
(20, 'Jalan jalan ke Madinah', 10000000, 5640000, 50, '2024-09-21', '2024-09-23', 5, 2, '2024-09-20 11:37:57', '2024-09-20 12:14:23');

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

--
-- Table structure for table `package_additionals`
--

CREATE TABLE `package_additionals` (
  `id` bigint UNSIGNED NOT NULL,
  `package_id` bigint UNSIGNED NOT NULL,
  `additional_id` bigint UNSIGNED NOT NULL,
  `is_selected` tinyint(1) NOT NULL DEFAULT '0',
  `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 `package_additionals`
--

INSERT INTO `package_additionals` (`id`, `package_id`, `additional_id`, `is_selected`, `created_at`, `updated_at`) VALUES
(9, 20, 2, 0, '2024-09-20 11:37:57', '2024-09-20 11:37:57'),
(10, 20, 4, 0, '2024-09-20 11:37:57', '2024-09-20 11:37:57');

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

--
-- Table structure for table `package_destinations`
--

CREATE TABLE `package_destinations` (
  `id` bigint UNSIGNED NOT NULL,
  `package_id` bigint UNSIGNED NOT NULL,
  `location_id` bigint UNSIGNED NOT NULL,
  `order` int 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 `package_destinations`
--

INSERT INTO `package_destinations` (`id`, `package_id`, `location_id`, `order`, `created_at`, `updated_at`) VALUES
(19, 20, 3, 1, '2024-09-20 11:37:57', '2024-09-20 11:37:57');

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

--
-- Table structure for table `package_documents`
--

CREATE TABLE `package_documents` (
  `id` bigint UNSIGNED NOT NULL,
  `package_id` bigint UNSIGNED NOT NULL,
  `document_type_id` bigint UNSIGNED NOT NULL,
  `is_required` tinyint(1) NOT NULL DEFAULT '0',
  `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 `package_documents`
--

INSERT INTO `package_documents` (`id`, `package_id`, `document_type_id`, `is_required`, `created_at`, `updated_at`) VALUES
(8, 20, 3, 0, '2024-09-20 11:37:57', '2024-09-20 11:37:57'),
(9, 20, 4, 0, '2024-09-20 11:37:57', '2024-09-20 11:37:57'),
(10, 20, 5, 0, '2024-09-20 11:37:57', '2024-09-20 11:37:57');

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

--
-- Table structure for table `package_hotels`
--

CREATE TABLE `package_hotels` (
  `id` bigint UNSIGNED NOT NULL,
  `package_destination_id` bigint UNSIGNED NOT NULL,
  `hotel_id` bigint 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 for table `package_hotels`
--

INSERT INTO `package_hotels` (`id`, `package_destination_id`, `hotel_id`, `created_at`, `updated_at`) VALUES
(17, 19, 7, '2024-09-20 11:37:57', '2024-09-20 11:37:57');

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

--
-- Table structure for table `package_hotel_rooms`
--

CREATE TABLE `package_hotel_rooms` (
  `id` bigint UNSIGNED NOT NULL,
  `package_hotel_id` bigint UNSIGNED NOT NULL,
  `hotel_room_id` bigint UNSIGNED NOT NULL,
  `is_selected` tinyint(1) NOT NULL DEFAULT '0',
  `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 `package_hotel_rooms`
--

INSERT INTO `package_hotel_rooms` (`id`, `package_hotel_id`, `hotel_room_id`, `is_selected`, `created_at`, `updated_at`) VALUES
(15, 17, 6, 0, '2024-09-20 11:37:57', '2024-09-20 11:37:57');

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

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('r97r824lJd8ejFp4QFqeKatctHikxpfUO22DdFW1', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiVjZOVzlMZnRvVDZGTTJCQm9CMzhmY0dMSnUyMGNadE0yekZ6WTFxOSI7czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTtzOjk6Il9wcmV2aW91cyI7YToxOntzOjM6InVybCI7czoyODoiaHR0cDovL21hemF5YS50ZXN0L2Rhc2hib2FyZCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1726859898);

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

--
-- Table structure for table `vehicles`
--

CREATE TABLE `vehicles` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `max_seats` int NOT NULL,
  `location_id` bigint UNSIGNED NOT NULL,
  `destination_id` bigint 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 for table `vehicles`
--

INSERT INTO `vehicles` (`id`, `name`, `price`, `max_seats`, `location_id`, `destination_id`, `created_at`, `updated_at`) VALUES
(2, 'Bus AC', 125000.00, 10, 5, 4, '2024-08-19 22:19:32', '2024-08-19 22:33:48');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `additionals`
--
ALTER TABLE `additionals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `additional_location_id_foreign` (`location_id`);

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

--
-- Indexes for table `departures`
--
ALTER TABLE `departures`
  ADD PRIMARY KEY (`id`),
  ADD KEY `departures_departure_id_foreign` (`departure_id`),
  ADD KEY `departures_destination_id_foreign` (`destination_id`);

--
-- Indexes for table `document_types`
--
ALTER TABLE `document_types`
  ADD PRIMARY KEY (`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 `hotels`
--
ALTER TABLE `hotels`
  ADD PRIMARY KEY (`id`),
  ADD KEY `hotels_location_id_foreign` (`location_id`);

--
-- Indexes for table `hotel_rooms`
--
ALTER TABLE `hotel_rooms`
  ADD PRIMARY KEY (`id`),
  ADD KEY `hotel_rooms_hotel_id_foreign` (`hotel_id`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

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

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

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

--
-- Indexes for table `packages`
--
ALTER TABLE `packages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `packages_departure_location_id_foreign` (`departure_location_id`),
  ADD KEY `packages_vehicle_id_foreign` (`vehicle_id`);

--
-- Indexes for table `package_additionals`
--
ALTER TABLE `package_additionals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `package_additionals_package_id_foreign` (`package_id`),
  ADD KEY `package_additionals_additional_id_foreign` (`additional_id`);

--
-- Indexes for table `package_destinations`
--
ALTER TABLE `package_destinations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `package_destinations_package_id_foreign` (`package_id`),
  ADD KEY `package_destinations_location_id_foreign` (`location_id`);

--
-- Indexes for table `package_documents`
--
ALTER TABLE `package_documents`
  ADD PRIMARY KEY (`id`),
  ADD KEY `package_documents_package_id_foreign` (`package_id`),
  ADD KEY `package_documents_document_type_id_foreign` (`document_type_id`);

--
-- Indexes for table `package_hotels`
--
ALTER TABLE `package_hotels`
  ADD PRIMARY KEY (`id`),
  ADD KEY `package_hotels_package_destination_id_foreign` (`package_destination_id`),
  ADD KEY `package_hotels_hotel_id_foreign` (`hotel_id`);

--
-- Indexes for table `package_hotel_rooms`
--
ALTER TABLE `package_hotel_rooms`
  ADD PRIMARY KEY (`id`),
  ADD KEY `package_hotel_rooms_package_hotel_id_foreign` (`package_hotel_id`),
  ADD KEY `package_hotel_rooms_hotel_room_id_foreign` (`hotel_room_id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `vehicles`
--
ALTER TABLE `vehicles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `vehicles_location_id_foreign` (`location_id`),
  ADD KEY `vehicles_destination_id_foreign` (`destination_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `additionals`
--
ALTER TABLE `additionals`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `currency_conversions`
--
ALTER TABLE `currency_conversions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `departures`
--
ALTER TABLE `departures`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `document_types`
--
ALTER TABLE `document_types`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `hotels`
--
ALTER TABLE `hotels`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `hotel_rooms`
--
ALTER TABLE `hotel_rooms`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `locations`
--
ALTER TABLE `locations`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `packages`
--
ALTER TABLE `packages`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `package_additionals`
--
ALTER TABLE `package_additionals`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `package_destinations`
--
ALTER TABLE `package_destinations`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `package_documents`
--
ALTER TABLE `package_documents`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `package_hotels`
--
ALTER TABLE `package_hotels`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT for table `package_hotel_rooms`
--
ALTER TABLE `package_hotel_rooms`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `vehicles`
--
ALTER TABLE `vehicles`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `additionals`
--
ALTER TABLE `additionals`
  ADD CONSTRAINT `additional_location_id_foreign` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `departures`
--
ALTER TABLE `departures`
  ADD CONSTRAINT `departures_departure_id_foreign` FOREIGN KEY (`departure_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `departures_destination_id_foreign` FOREIGN KEY (`destination_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `hotels`
--
ALTER TABLE `hotels`
  ADD CONSTRAINT `hotels_location_id_foreign` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `hotel_rooms`
--
ALTER TABLE `hotel_rooms`
  ADD CONSTRAINT `hotel_rooms_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `packages`
--
ALTER TABLE `packages`
  ADD CONSTRAINT `packages_departure_location_id_foreign` FOREIGN KEY (`departure_location_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `packages_vehicle_id_foreign` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicles` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `package_additionals`
--
ALTER TABLE `package_additionals`
  ADD CONSTRAINT `package_additionals_additional_id_foreign` FOREIGN KEY (`additional_id`) REFERENCES `additionals` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `package_additionals_package_id_foreign` FOREIGN KEY (`package_id`) REFERENCES `packages` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `package_destinations`
--
ALTER TABLE `package_destinations`
  ADD CONSTRAINT `package_destinations_location_id_foreign` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `package_destinations_package_id_foreign` FOREIGN KEY (`package_id`) REFERENCES `packages` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `package_documents`
--
ALTER TABLE `package_documents`
  ADD CONSTRAINT `package_documents_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `document_types` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `package_documents_package_id_foreign` FOREIGN KEY (`package_id`) REFERENCES `packages` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `package_hotels`
--
ALTER TABLE `package_hotels`
  ADD CONSTRAINT `package_hotels_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `package_hotels_package_destination_id_foreign` FOREIGN KEY (`package_destination_id`) REFERENCES `package_destinations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `package_hotel_rooms`
--
ALTER TABLE `package_hotel_rooms`
  ADD CONSTRAINT `package_hotel_rooms_hotel_room_id_foreign` FOREIGN KEY (`hotel_room_id`) REFERENCES `hotel_rooms` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `package_hotel_rooms_package_hotel_id_foreign` FOREIGN KEY (`package_hotel_id`) REFERENCES `package_hotels` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `vehicles`
--
ALTER TABLE `vehicles`
  ADD CONSTRAINT `vehicles_destination_id_foreign` FOREIGN KEY (`destination_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `vehicles_location_id_foreign` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE CASCADE;
COMMIT;

