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

START TRANSACTION;



--
-- Database: `challenge_globalxtreme`
--

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

--
-- Table structure for table `annual_leaves`
--

CREATE TABLE `annual_leaves` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `staff_id` 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 for table `annual_leaves`
--

INSERT INTO `annual_leaves` (`id`, `date`, `staff_id`, `created_at`, `updated_at`) VALUES
(1, '2023-09-25', 1, '2023-09-21 14:59:09', '2023-09-21 14:59:09'),
(2, '2023-09-25', 2, '2023-09-21 14:59:46', '2023-09-21 14:59:46'),
(3, '2023-09-25', 3, '2023-09-21 14:59:50', '2023-09-21 14:59:50'),
(4, '2023-09-25', 4, '2023-09-21 14:59:53', '2023-09-21 14:59:53'),
(5, '2023-09-25', 5, '2023-09-21 14:59:57', '2023-09-21 14:59:57'),
(6, '2023-09-25', 6, '2023-09-21 15:00:03', '2023-09-21 15:00:03'),
(7, '2023-09-25', 7, '2023-09-21 15:00:07', '2023-09-21 15:00:07'),
(8, '2023-09-25', 8, '2023-09-21 15:00:11', '2023-09-21 15:00:11'),
(15, '2023-09-26', 1, '2023-09-21 15:10:03', '2023-09-21 15:10:03'),
(16, '2023-09-28', 1, '2023-09-21 15:10:07', '2023-09-21 15:10:07'),
(17, '2023-09-29', 1, '2023-09-21 15:10:09', '2023-09-21 15:10:09'),
(18, '2023-09-30', 1, '2023-09-21 15:10:12', '2023-09-21 15:10:12');

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

--
-- Table structure for table `attendances`
--

CREATE TABLE `attendances` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `clock_in_status` enum('alpha','late','early','no clock-in','valid') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'no clock-in',
  `clock_out_status` enum('alpha','late','early','no clock-out','valid') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'no clock-out',
  `clock_in` time DEFAULT NULL,
  `clock_out` time DEFAULT NULL,
  `staff_id` 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 for table `attendances`
--

INSERT INTO `attendances` (`id`, `date`, `clock_in_status`, `clock_out_status`, `clock_in`, `clock_out`, `staff_id`, `created_at`, `updated_at`) VALUES
(1, '2023-09-21', 'no clock-in', 'no clock-out', '09:06:00', '20:28:00', 1, '2023-09-21 02:06:41', '2023-09-21 13:28:11'),
(2, '2023-09-21', 'no clock-in', 'no clock-out', '16:07:00', '20:27:00', 2, '2023-09-21 09:07:49', '2023-09-21 13:27:48'),
(3, '2023-09-21', 'no clock-in', 'no clock-out', NULL, '20:28:00', 3, '2023-09-21 13:28:40', '2023-09-21 13:28:40'),
(4, '2023-09-22', 'late', 'no clock-out', '15:12:00', NULL, 1, '2023-09-22 08:12:11', '2023-09-22 08:12:11'),
(5, '2023-09-27', 'late', 'early', '16:27:00', '16:49:00', 2, '2023-09-27 09:27:36', '2023-09-27 09:49:36'),
(6, '2023-09-27', 'late', 'no clock-out', '16:28:00', NULL, 3, '2023-09-27 09:28:31', '2023-09-27 09:28:31'),
(7, '2023-09-27', 'late', 'no clock-out', '16:29:00', NULL, 4, '2023-09-27 09:29:36', '2023-09-27 09:29:36'),
(8, '2023-09-27', 'early', 'late', '16:30:00', '10:39:41', 5, '2023-09-27 09:30:42', '2023-09-28 03:39:41'),
(9, '2023-09-27', 'early', 'no clock-out', '16:30:00', NULL, 6, '2023-09-27 09:30:50', '2023-09-27 09:30:50'),
(10, '2023-09-27', 'no clock-in', 'late', NULL, '17:24:02', 7, '2023-09-27 10:24:02', '2023-09-27 10:24:02'),
(11, '2023-09-27', 'no clock-in', 'late', NULL, '17:27:10', 8, '2023-09-27 10:27:10', '2023-09-27 10:27:10'),
(12, '2023-09-27', 'late', 'late', '17:27:41', '17:27:45', 9, '2023-09-27 10:27:41', '2023-09-27 10:27:45'),
(13, '2023-09-28', 'no clock-in', 'early', NULL, '10:36:06', 5, '2023-09-28 03:36:07', '2023-09-28 03:36:07');

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

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

CREATE TABLE `failed_jobs` (
  `id` bigint(20) 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 `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
(11, '2014_10_12_000000_create_users_table', 1),
(12, '2014_10_12_100000_create_password_reset_tokens_table', 1),
(13, '2014_10_12_100000_create_password_resets_table', 1),
(14, '2016_06_01_000001_create_oauth_auth_codes_table', 1),
(15, '2016_06_01_000002_create_oauth_access_tokens_table', 1),
(16, '2016_06_01_000003_create_oauth_refresh_tokens_table', 1),
(17, '2016_06_01_000004_create_oauth_clients_table', 1),
(18, '2016_06_01_000005_create_oauth_personal_access_clients_table', 1),
(19, '2019_08_19_000000_create_failed_jobs_table', 1),
(20, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(21, '2023_09_20_083535_create_staff_table', 2),
(22, '2023_09_20_083601_create_shifts_table', 2),
(23, '2023_09_20_083640_create_staff_has_shift_table', 2),
(24, '2023_09_20_083653_create_attendances_table', 2),
(25, '2023_09_20_083701_create_annual_leaves_table', 2),
(26, '2023_09_20_083713_create_operational_days_table', 2),
(27, '2023_09_20_083725_create_national_holidays_table', 2),
(28, '2023_09_22_140821_modify_attendances_table', 3);

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

--
-- Table structure for table `national_holidays`
--

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

INSERT INTO `national_holidays` (`id`, `name`, `date`, `created_at`, `updated_at`) VALUES
(1, 'Maulid Nabi Muhammad SAW', '2023-09-27', '2023-09-21 14:16:49', '2023-09-21 14:20:50'),
(2, 'Natal', '2023-12-25', '2023-09-21 14:17:40', '2023-09-21 14:17:40');

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

--
-- Table structure for table `oauth_auth_codes`
--

CREATE TABLE `oauth_auth_codes` (
  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `client_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `scopes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `oauth_auth_codes`
--

INSERT INTO `oauth_auth_codes` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `expires_at`) VALUES
('14bccc4ada55913cb2788bf34647562cd50181b5907c676af75fc7b1f3a3654d0ee6fb4c9abebc7c', 1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '[]', 0, '2023-09-25 14:49:03'),
('82f6821919050ab92fc5c3d6e94baccc00f815b228c588c027d758186b2114b913145c93bc9f0088', 1, '9a2d4c8a-e0cb-4b6b-99c9-1be1ec6ff2a2', '[]', 1, '2023-09-25 14:50:34'),
('af536051f506b82a1eea84b1ce3ea1d859ed62454f5a4bffd489061692c9f92b9760a5fb094b25e5', 1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '[]', 0, '2023-09-25 14:49:03'),
('c18d372c4a9e389e8e0cf91db890800b5424e418c3b102c9baf81ff2bc0ef1a05747011844df7eb6', 1, '9a2d4c8a-e0cb-4b6b-99c9-1be1ec6ff2a2', '[]', 0, '2023-09-25 14:50:35'),
('f1a7aa22d4208d378f588cacedfd1e5bbb6d6ced8a109e8a0b222ed832ab28a3cf4983998ca06604', 1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '[]', 0, '2023-09-25 14:36:52'),
('f6a1c8161d926b8834bd9aec3131d7a6984a514f7628368f7f24a2748e52c0d0810f93a2d5d7d948', 1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '[]', 0, '2023-09-25 14:43:06'),
('fff4f75b6c1c4ac4db7bbf129ff960719c4f8046b66b2ad7dd047be4e8e8abc6b8047abf4b539a51', 1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '[]', 0, '2023-09-25 14:46:00');

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

--
-- Table structure for table `oauth_personal_access_clients`
--

CREATE TABLE `oauth_personal_access_clients` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `client_id` char(36) 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 `oauth_personal_access_clients`
--

INSERT INTO `oauth_personal_access_clients` (`id`, `client_id`, `created_at`, `updated_at`) VALUES
(1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '2023-09-20 00:00:25', '2023-09-20 00:00:25');

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

--
-- Table structure for table `operational_days`
--

CREATE TABLE `operational_days` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `day` tinyint(3) UNSIGNED NOT NULL,
  `operating` tinyint(1) 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 `operational_days`
--

INSERT INTO `operational_days` (`id`, `day`, `operating`, `created_at`, `updated_at`) VALUES
(1, 0, 0, NULL, NULL),
(2, 1, 1, NULL, NULL),
(3, 2, 1, NULL, NULL),
(4, 3, 1, NULL, NULL),
(5, 4, 1, NULL, NULL),
(6, 5, 1, NULL, NULL),
(7, 6, 1, NULL, '2023-09-28 04:09:05');

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

--
-- Table structure for table `shifts`
--

CREATE TABLE `shifts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `clock_in` time NOT NULL,
  `clock_out` time NOT NULL,
  `default` tinyint(1) 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 `shifts`
--

INSERT INTO `shifts` (`id`, `name`, `clock_in`, `clock_out`, `default`, `created_at`, `updated_at`) VALUES
(2, 'Shift Malam', '22:00:00', '07:00:00', 0, '2023-09-20 22:37:20', '2023-09-26 16:24:07'),
(3, 'Shift Pagi', '08:00:00', '17:00:00', 1, '2023-09-21 00:37:16', '2023-09-26 16:24:07');

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

--
-- Table structure for table `staff`
--

CREATE TABLE `staff` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nip` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `leave_quota` smallint(6) NOT NULL DEFAULT 5,
  `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 `staff`
--

INSERT INTO `staff` (`id`, `name`, `nip`, `leave_quota`, `created_at`, `updated_at`) VALUES
(1, 'Mozell Heath', '694837', 0, '2023-09-20 21:47:40', '2023-09-26 14:06:07'),
(2, 'Miss Luisa Heidenreich DVM', '502181', 4, '2023-09-20 21:47:40', '2023-09-20 21:47:40'),
(3, 'Valerie Carter', '342513', 4, '2023-09-20 21:47:40', '2023-09-20 21:47:40'),
(4, 'Omari Mante', '567680', 4, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(5, 'Kali Kris', '174333', 4, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(6, 'Lola Mante', '522324', 4, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(7, 'Miss Celine Zieme', '227564', 4, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(8, 'Rossie Schmitt', '943856', 4, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(9, 'Josh Weissnat', '798834', 5, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(10, 'Dayne Bauch', '666599', 5, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(11, 'Tracey Dickens', '773315', 5, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(12, 'Emelia Jacobs', '526994', 5, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(13, 'Ruthie Leffler', '945330', 5, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(14, 'Melba Blick', '416096', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(15, 'Kennith Johnson', '306657', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(16, 'Jaden Miller MD', '886598', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(17, 'Addie Emard', '501699', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(18, 'Stanford Lakin V', '483062', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(19, 'Kaitlin Fritsch I', '373888', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(20, 'Kelly Upton', '597374', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(21, 'Shawn Wiegand', '954146', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(22, 'Adella Dicki', '785554', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(23, 'Virgie Weimann', '549918', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(24, 'Dr. Jonatan Legros', '866968', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(25, 'Prof. Gennaro Torphy III', '458671', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(26, 'Amya Murray', '845476', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(27, 'Sharon Smitham', '686357', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(28, 'Rosetta Kessler', '335307', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(29, 'Miss Una Ondricka Sr.', '201629', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(30, 'Prof. Imani Welch II', '791044', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(31, 'Beatrice Hills DVM', '159245', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(32, 'Josianne Buckridge', '175143', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(33, 'Rosetta Marvin', '960211', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(34, 'Dr. Rodolfo Hansen', '432448', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(35, 'Hester Satterfield', '227312', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(36, 'Alf Rath', '776240', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(37, 'Dr. Carli Ziemann', '901766', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(38, 'Miss Vickie Kohler', '319901', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(39, 'Lee Bogan', '636114', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(40, 'Otilia Kunde', '957856', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(41, 'Murray Price', '810499', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(42, 'Armando Howell', '126582', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(43, 'Prof. Jakayla Wyman', '540175', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(44, 'Mr. Alphonso Waters', '266856', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(45, 'Zelda Keebler DVM', '761075', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(46, 'Selina Von', '607120', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(47, 'Bryana Braun II', '883833', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(48, 'Rudy Block', '125599', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(49, 'Dr. Quincy Herzog', '644236', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(50, 'Oma Greenholt', '879728', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44');

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

--
-- Table structure for table `staff_has_shift`
--

CREATE TABLE `staff_has_shift` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `staff_id` bigint(20) UNSIGNED NOT NULL,
  `shift_id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `staff_has_shift`
--

INSERT INTO `staff_has_shift` (`id`, `staff_id`, `shift_id`, `date`) VALUES
(1, 1, 3, '2023-09-21'),
(2, 1, 3, '2023-09-22'),
(3, 1, 3, '2023-09-23'),
(5, 2, 3, '2023-09-21'),
(7, 4, 3, '2023-09-21'),
(8, 5, 3, '2023-09-21'),
(10, 7, 2, '2023-09-21'),
(11, 8, 2, '2023-09-21'),
(13, 10, 2, '2023-09-21'),
(14, 2, 2, '2023-09-22'),
(17, 5, 2, '2023-09-27'),
(18, 6, 2, '2023-09-27'),
(20, 7, 3, '2023-09-27'),
(22, 40, 3, '2023-09-27'),
(23, 39, 2, '2023-09-27'),
(24, 38, 2, '2023-09-27'),
(25, 37, 2, '2023-09-27'),
(26, 36, 3, '2023-09-27');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `annual_leaves`
--
ALTER TABLE `annual_leaves`
  ADD PRIMARY KEY (`id`),
  ADD KEY `annual_leaves_staff_id_foreign` (`staff_id`);

--
-- Indexes for table `attendances`
--
ALTER TABLE `attendances`
  ADD PRIMARY KEY (`id`),
  ADD KEY `attendances_staff_id_foreign` (`staff_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 `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

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

--
-- Indexes for table `oauth_auth_codes`
--
ALTER TABLE `oauth_auth_codes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `oauth_auth_codes_user_id_index` (`user_id`);

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

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

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

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

--
-- Indexes for table `staff_has_shift`
--
ALTER TABLE `staff_has_shift`
  ADD PRIMARY KEY (`id`),
  ADD KEY `staff_has_shift_staff_id_foreign` (`staff_id`),
  ADD KEY `staff_has_shift_shift_id_foreign` (`shift_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `annual_leaves`
--
ALTER TABLE `annual_leaves`
  ADD CONSTRAINT `annual_leaves_staff_id_foreign` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `attendances`
--
ALTER TABLE `attendances`
  ADD CONSTRAINT `attendances_staff_id_foreign` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `staff_has_shift`
--
ALTER TABLE `staff_has_shift`
  ADD CONSTRAINT `staff_has_shift_shift_id_foreign` FOREIGN KEY (`shift_id`) REFERENCES `shifts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `staff_has_shift_staff_id_foreign` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE;
COMMIT;

