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

START TRANSACTION;



--
-- Database: `portal`
--

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

--
-- Table structure for table `adminleavesettings`
--

CREATE TABLE `adminleavesettings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `financial_year` bigint(20) UNSIGNED NOT NULL,
  `casual_leave` varchar(255) NOT NULL,
  `medical_leave` varchar(255) NOT NULL,
  `is_applied` 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 `adminleavesettings`
--

INSERT INTO `adminleavesettings` (`id`, `financial_year`, `casual_leave`, `medical_leave`, `is_applied`, `created_at`, `updated_at`) VALUES
(1, 1, '8', '4', 1, '2023-09-29 06:08:23', '2023-09-29 06:08:23'),
(2, 1, '12', '6', 1, '2023-10-03 01:19:12', '2023-10-03 01:19:12');

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

--
-- Table structure for table `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;

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

--
-- Table structure for table `financialyears`
--

CREATE TABLE `financialyears` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `financial_year` varchar(255) NOT NULL,
  `from_date` date NOT NULL,
  `to_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 `financialyears`
--

INSERT INTO `financialyears` (`id`, `financial_year`, `from_date`, `to_date`, `created_at`, `updated_at`) VALUES
(1, 'FY2023', '2023-01-01', '2023-12-31', '2023-09-27 01:51:46', '2023-09-27 01:51:46'),
(2, 'FY2024', '2024-01-01', '2024-12-01', '2023-10-14 04:24:03', '2023-10-14 04:24:03');

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

--
-- Table structure for table `integrations`
--

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

INSERT INTO `integrations` (`id`, `teamswebhook`, `created_at`, `updated_at`) VALUES
(1, 'https://oryonbiz.webhook.office.com/webhookb2/85f5c5a3-f27a-492e-8c09-4b6193b58f4a@12865514-f6fa-41c1-a8cc-f2bdb7811483/IncomingWebhook/5c161694648045e4bd3c6f87411c3420/2a526e00-d3e7-456c-9455-b5ae68f89609', '2023-10-06 04:54:07', '2023-10-06 04:54:07');

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

--
-- Table structure for table `leaves`
--

CREATE TABLE `leaves` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `leave_applicant` bigint(20) UNSIGNED NOT NULL,
  `applied_date` date NOT NULL,
  `leave_type` varchar(255) NOT NULL,
  `from_date` date NOT NULL,
  `to_date` date NOT NULL,
  `reason` text NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_approval` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `leaves`
--

INSERT INTO `leaves` (`id`, `leave_applicant`, `applied_date`, `leave_type`, `from_date`, `to_date`, `reason`, `created_at`, `updated_at`, `is_approval`) VALUES
(1, 4, '2023-09-09', 'Casual Leave', '2023-09-09', '2023-09-11', 'demo', '2023-09-08 22:50:50', '2023-09-09 02:11:46', 1),
(2, 4, '2023-09-09', 'Medical Leave', '2023-09-12', '2023-09-15', 'Fever', '2023-09-09 02:07:00', '2023-09-11 00:30:08', 1),
(3, 5, '2023-09-11', 'Casual Leave', '2023-09-11', '2023-09-14', 'Occasion', '2023-09-10 23:32:40', '2023-09-10 23:32:40', 0),
(6, 10, '2023-09-13', 'Medical Leave', '2023-09-13', '2023-09-15', 'Fever', '2023-09-12 22:15:08', '2023-09-12 22:16:16', 1),
(7, 10, '2023-09-13', 'casual leave', '2023-09-20', '2023-09-21', 'Festival', '2023-09-12 23:30:51', '2023-09-13 01:48:21', 1),
(34, 2, '2023-09-26', 'Casual Leave', '2023-09-27', '2023-09-28', 'function', '2023-09-26 05:01:36', '2023-10-06 05:34:49', 1),
(42, 2, '2023-09-26', 'Casual Leave', '2023-09-19', '2023-09-20', 'occasion', '2023-09-26 05:53:45', '2023-09-26 05:53:45', 0),
(43, 3, '2023-10-06', 'Casual Leave', '2023-10-06', '2023-10-08', 'demo', '2023-10-06 03:40:54', '2023-10-06 03:40:54', 0),
(44, 2, '2023-10-06', 'Casual Leave', '2023-10-06', '2023-10-07', 'emergency', '2023-10-06 03:53:13', '2023-10-06 03:53:13', 0),
(45, 2, '2023-10-06', 'Medical Leave', '2023-10-08', '2023-10-13', 'fever', '2023-10-06 05:12:40', '2023-10-06 05:12:40', 0);

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

--
-- Table structure for table `leavetypes`
--

CREATE TABLE `leavetypes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `leavetype` varchar(255) NOT NULL,
  `leavedays` 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 for table `leavetypes`
--

INSERT INTO `leavetypes` (`id`, `leavetype`, `leavedays`, `created_at`, `updated_at`) VALUES
(1, 'maternity leave', '5', '2023-10-14 04:15:06', '2023-10-14 04:15:06'),
(2, 'paternity leave', '5', '2023-10-14 04:16:20', '2023-10-14 04:16:20'),
(3, 'sick leave', '5', '2023-10-14 04:16:37', '2023-10-14 04:16:37'),
(4, 'demo', '3', '2023-10-14 04:24:52', '2023-10-14 04:24:52');

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

--
-- Table structure for table `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 for table `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, '2023_09_04_043016_create_permission_tables', 1),
(6, '2023_09_04_043356_add_permission_group_id_to_permissions_table', 1),
(7, '2023_09_04_043439_create_permission_groups_table', 1),
(8, '2023_09_04_073918_create_userprofiles_table', 1),
(9, '2023_09_04_074333_create_userexperiences_table', 1),
(10, '2023_09_04_074705_create_usereducations_table', 1),
(11, '2023_09_04_114723_create_userportals_table', 2),
(12, '2023_09_05_034817_create_organizations_table', 3),
(13, '2023_09_05_034938_create_integrations_table', 4),
(14, '2023_09_08_062942_create_leaves_table', 5),
(15, '2023_09_08_103113_add_column_to_userprofiles_table', 6),
(16, '2023_09_08_111951_create_leaves_table', 7),
(17, '2023_09_09_045359_add_column_to_leaves_table', 8),
(18, '2023_09_15_073328_create_publicholidays_table', 9),
(19, '2023_09_21_101352_add_casual_and_medical_leave_to_userprofiles_table', 10),
(20, '2023_09_22_073525_create_adminleavesettings_table', 11),
(21, '2023_09_23_072116_create_financialyears_table', 12),
(22, '2023_09_23_091517_create_adminleavesettings_table', 13),
(23, '2023_09_28_075023_add_is_applied_to_adminleavesettings_table', 14),
(24, '2023_10_09_035133_add_ssinterval_to_organizations_table', 15),
(25, '2023_10_09_035445_add_ssinterval_to_organizations_table', 16),
(26, '2023_10_11_040302_create_screenshots_table', 17),
(27, '2023_10_11_101012_add_date_to_screenshots_table', 18),
(28, '2023_10_14_081424_create_leave_type_table', 19),
(29, '2023_10_14_094314_create_leavetypes_table', 20);

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

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(1, 'App\\Models\\User', 1),
(2, 'App\\Models\\User', 2),
(2, 'App\\Models\\User', 3),
(3, 'App\\Models\\User', 2),
(3, 'App\\Models\\User', 3),
(3, 'App\\Models\\User', 4),
(3, 'App\\Models\\User', 5),
(3, 'App\\Models\\User', 6),
(3, 'App\\Models\\User', 7),
(3, 'App\\Models\\User', 8),
(3, 'App\\Models\\User', 10),
(3, 'App\\Models\\User', 11),
(3, 'App\\Models\\User', 15),
(3, 'App\\Models\\User', 16),
(3, 'App\\Models\\User', 19),
(3, 'App\\Models\\User', 21),
(3, 'App\\Models\\User', 23),
(3, 'App\\Models\\User', 24),
(3, 'App\\Models\\User', 25),
(3, 'App\\Models\\User', 26),
(3, 'App\\Models\\User', 27),
(3, 'App\\Models\\User', 28),
(3, 'App\\Models\\User', 29),
(3, 'App\\Models\\User', 30),
(3, 'App\\Models\\User', 31),
(3, 'App\\Models\\User', 33),
(3, 'App\\Models\\User', 34),
(3, 'App\\Models\\User', 35);

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

--
-- Table structure for table `organizations`
--

CREATE TABLE `organizations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `org_name` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `org_logo` varchar(255) DEFAULT NULL,
  `ssinterval` 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;

--
-- Dumping data for table `organizations`
--

INSERT INTO `organizations` (`id`, `org_name`, `filename`, `org_logo`, `ssinterval`, `created_at`, `updated_at`) VALUES
(1, 'oryon exceeding expectation', '1693887530.png', 'logos/1693887530.png', NULL, '2023-09-04 22:48:50', '2023-09-04 22:48:50'),
(2, 'oryon exceeding expectation', '1696824139.png', 'logos/1696824139.png', '3600000', '2023-10-08 22:32:19', '2023-10-08 22:32:19'),
(3, 'oryon exceeding expectation', '1696824736.png', 'logos/1696824736.png', '60000', '2023-10-08 22:42:16', '2023-10-08 22:42:16'),
(4, 'oryon exceeding expectation', '1696830762.png', 'logos/1696830762.png', '3600000', '2023-10-09 00:22:42', '2023-10-09 00:22:42'),
(5, 'oryon exceeding expectation', '1696997162.png', 'logos/1696997162.png', '60000', '2023-10-10 22:36:02', '2023-10-10 22:36:02'),
(6, 'oryon exceeding expectation', '1696997558.png', 'logos/1696997558.png', '1800000', '2023-10-10 22:42:38', '2023-10-10 22:42:38'),
(7, 'oryon exceeding expectation', '1696998417.png', 'logos/1696998417.png', '60000', '2023-10-10 22:56:57', '2023-10-10 22:56:57'),
(8, 'oryon exceeding expectation', '1696998616.png', 'logos/1696998616.png', '1800000', '2023-10-10 23:00:16', '2023-10-10 23:00:16'),
(9, 'oryon exceeding expectation', '1697001426.png', 'logos/1697001426.png', '60000', '2023-10-10 23:47:06', '2023-10-10 23:47:06'),
(10, 'oryon exceeding expectation', '1697001679.png', 'logos/1697001679.png', '1800000', '2023-10-10 23:51:19', '2023-10-10 23:51:19'),
(11, 'oryon exceeding expectation', '1697173519.png', 'logos/1697173519.png', '60000', '2023-10-12 23:35:19', '2023-10-12 23:35:19'),
(12, 'oryon exceeding expectation', '1697173980.png', 'logos/1697173980.png', '1800000', '2023-10-12 23:43:00', '2023-10-12 23:43:00'),
(13, 'oryon exceeding expectation', '1697188536.png', 'logos/1697188536.png', '60000', '2023-10-13 03:45:36', '2023-10-13 03:45:36'),
(14, 'oryon exceeding expectation', '1697192137.png', 'logos/1697192137.png', '1800000', '2023-10-13 04:45:37', '2023-10-13 04:45:37'),
(15, 'oryon exceeding expectation', '1697255810.png', 'logos/1697255810.png', '60000', '2023-10-13 22:26:50', '2023-10-13 22:26:50'),
(16, 'oryon exceeding expectation', '1697255942.png', 'logos/1697255942.png', '1800000', '2023-10-13 22:29:02', '2023-10-13 22:29:02');

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

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `permission_group_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`, `permission_group_id`) VALUES
(1, 'Portal', 'web', '2023-10-12 08:37:01', '2023-10-12 08:37:01', 1),
(2, 'Profile', 'web', '2023-10-12 08:37:28', '2023-10-12 08:37:28', 1),
(3, 'Report', 'web', '2023-10-12 08:37:58', '2023-10-12 08:37:58', 1),
(4, 'Apply Leave', 'web', '2023-10-12 08:38:21', '2023-10-12 08:38:21', 1),
(5, 'Public Holiday', 'web', '2023-10-12 08:38:51', '2023-10-12 08:38:51', 1),
(6, 'Dashboard', 'web', '2023-10-12 08:39:16', '2023-10-12 08:39:16', 2),
(7, 'Settings', 'web', '2023-10-12 08:39:54', '2023-10-12 08:39:54', 2),
(8, 'Financial Year', 'web', '2023-10-12 08:40:26', '2023-10-12 08:40:26', 2),
(9, 'Financial Leave', 'web', '2023-10-12 08:40:55', '2023-10-12 08:40:55', 2),
(10, 'User List', 'web', '2023-10-12 08:41:21', '2023-10-12 08:41:21', 2),
(11, 'Add Roles', 'web', '2023-10-12 08:41:48', '2023-10-12 08:41:48', 2),
(12, 'User Roles', 'web', '2023-10-12 08:43:11', '2023-10-12 08:43:11', 2),
(13, 'UserReport', 'web', '2023-10-12 08:43:42', '2023-10-12 08:43:42', 2),
(14, 'LeaveReport', 'web', '2023-10-12 08:44:04', '2023-10-12 08:44:04', 2),
(15, 'Team Leave form', 'web', '2023-10-12 08:44:46', '2023-10-12 08:44:46', 2),
(16, 'Add Holiday', 'web', '2023-10-12 08:45:02', '2023-10-12 08:45:02', 2),
(17, 'Screenshots', 'web', '2023-10-12 08:45:23', '2023-10-12 08:45:23', 2);

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

--
-- Table structure for table `permission_groups`
--

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

INSERT INTO `permission_groups` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Employee', '2023-10-12 08:32:19', '2023-10-12 08:32:19'),
(2, 'Admin', '2023-10-12 08:32:42', '2023-10-12 08:32:42');

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

--
-- Table structure for table `publicholidays`
--

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

INSERT INTO `publicholidays` (`id`, `date`, `holiday`, `created_at`, `updated_at`) VALUES
(1, '2023-09-19', 'Ganesh Chaturthi', '2023-10-13 22:20:51', '2023-10-13 22:20:51'),
(2, '2023-09-28', 'Eid-E-Milad', '2023-10-13 22:21:10', '2023-10-13 22:21:10'),
(3, '2023-10-02', 'Gandhi Jayanti', '2023-10-13 22:21:23', '2023-10-13 22:21:23'),
(4, '2023-10-23', 'Maha Navami', '2023-10-13 22:21:40', '2023-10-13 22:21:40'),
(5, '2023-10-24', 'Vijaya Dashami', '2023-10-13 22:21:56', '2023-10-13 22:21:56'),
(6, '2023-11-12', 'Deepavali', '2023-10-13 22:22:09', '2023-10-13 22:22:09'),
(7, '2023-12-25', 'Christmas', '2023-10-13 22:22:27', '2023-10-13 22:22:27'),
(8, '2024-01-01', 'New Year', '2023-10-13 22:23:40', '2023-10-13 22:24:11');

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

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` 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 for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'Super Admin', 'web', '2023-09-04 03:26:19', '2023-09-04 03:26:19'),
(2, 'Admin', 'web', '2023-09-04 03:28:36', '2023-09-04 03:28:36'),
(3, 'Employee', 'web', '2023-09-05 05:27:09', '2023-09-05 05:27:09');

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

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_has_permissions`
--

INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
(1, 1),
(1, 2),
(1, 3),
(2, 1),
(2, 2),
(2, 3),
(3, 1),
(3, 2),
(3, 3),
(4, 1),
(4, 2),
(4, 3),
(5, 1),
(5, 2),
(5, 3),
(6, 1),
(6, 2),
(7, 1),
(7, 2),
(8, 1),
(8, 2),
(9, 1),
(9, 2),
(10, 1),
(10, 2),
(11, 1),
(11, 2),
(12, 1),
(12, 2),
(13, 1),
(13, 2),
(14, 1),
(14, 2),
(15, 1),
(15, 2),
(16, 1),
(16, 2),
(17, 1),
(17, 2);

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

--
-- Table structure for table `screenshots`
--

CREATE TABLE `screenshots` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `date_field` date DEFAULT NULL,
  `folder_name` 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 for table `screenshots`
--

INSERT INTO `screenshots` (`id`, `user_id`, `date_field`, `folder_name`, `created_at`, `updated_at`) VALUES
(1, 3, '2023-10-11', 'screenshots/y_2023/m_10/d_11/userid_3', '2023-10-10 22:59:24', '2023-10-10 22:59:24'),
(2, 2, '2023-10-11', 'screenshots/y_2023/m_10/d_11/userid_2', '2023-10-11 04:31:00', '2023-10-11 04:31:00'),
(3, 2, '2023-10-12', 'screenshots/y_2023/m_10/d_12/userid_2', '2023-10-11 22:54:26', '2023-10-11 22:54:26'),
(4, 2, NULL, 'screenshots/y_2023/m_10/d_13/userid_2', '2023-10-12 23:36:23', '2023-10-12 23:36:23'),
(5, 2, '2023-10-13', 'screenshots/y_2023/m_10/d_13/userid_2', '2023-10-12 23:41:25', '2023-10-12 23:41:25'),
(6, 2, '2023-10-14', 'screenshots/y_2023/m_10/d_14/userid_2', '2023-10-13 22:28:08', '2023-10-13 22:28:08'),
(7, 2, '2023-10-16', 'screenshots/y_2023/m_10/d_16/userid_2', '2023-10-16 00:47:10', '2023-10-16 00:47:10');

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

--
-- Table structure for table `usereducations`
--

CREATE TABLE `usereducations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `degree` varchar(255) NOT NULL,
  `branch` varchar(255) NOT NULL,
  `college` varchar(255) NOT NULL,
  `deleted_at` timestamp NULL 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 `usereducations`
--

INSERT INTO `usereducations` (`id`, `user_id`, `degree`, `branch`, `college`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 25, 'BE', 'E&I', 'SRM', NULL, '2023-09-13 00:11:47', '2023-09-13 00:26:59'),
(2, 2, 'BE', 'EEE', 'AAS', NULL, NULL, NULL),
(3, 3, 'BE', 'EEE', 'AAA', NULL, NULL, NULL);

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

--
-- Table structure for table `userexperiences`
--

CREATE TABLE `userexperiences` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `numofexperience` varchar(255) NOT NULL,
  `dateofjoining` date NOT NULL,
  `courses` varchar(255) NOT NULL,
  `deleted_at` timestamp NULL 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 `userexperiences`
--

INSERT INTO `userexperiences` (`id`, `user_id`, `numofexperience`, `dateofjoining`, `courses`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 25, '1', '2023-09-14', 'Data Analysts', NULL, '2023-09-13 00:09:27', '2023-09-13 00:24:38'),
(2, 2, '1', '2023-09-22', 'Web developement', NULL, NULL, NULL),
(3, 3, '1', '2023-10-06', 'Web developement', NULL, NULL, NULL);

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

--
-- Table structure for table `userportals`
--

CREATE TABLE `userportals` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `date_field` date NOT NULL,
  `punchintime` time DEFAULT NULL,
  `breakintime` time DEFAULT NULL,
  `breakouttime` time DEFAULT NULL,
  `punchouttime` time DEFAULT NULL,
  `total_shift_time` time DEFAULT NULL,
  `total_working_hours` time DEFAULT NULL,
  `total_break_time` 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 for table `userportals`
--

INSERT INTO `userportals` (`id`, `user_id`, `date_field`, `punchintime`, `breakintime`, `breakouttime`, `punchouttime`, `total_shift_time`, `total_working_hours`, `total_break_time`, `created_at`, `updated_at`) VALUES
(1, 2, '2023-09-04', '09:00:00', '12:00:00', '13:00:00', '17:00:00', '08:00:00', '07:00:00', '01:00:00', '2023-09-03 22:52:26', '2023-09-03 22:53:15'),
(2, 3, '2023-09-05', '10:33:11', '10:33:28', '10:33:45', '10:34:01', '00:00:50', '00:00:33', '00:00:17', '2023-09-04 23:33:11', '2023-09-04 23:34:01'),
(3, 2, '2023-09-05', '10:00:00', '13:00:00', '13:30:00', '18:00:00', '08:00:00', '07:30:00', '00:30:00', '2023-09-04 23:40:31', '2023-09-04 23:41:27'),
(4, 4, '2023-09-05', '07:00:00', '12:00:00', '12:30:00', '03:30:00', '08:30:00', '08:00:00', '00:30:00', '2023-09-05 06:33:10', '2023-09-05 06:35:15'),
(5, 4, '2023-09-08', '09:20:54', '09:21:45', '09:21:51', '09:21:58', '01:01:04', '00:40:58', '00:20:06', '2023-09-07 22:20:54', '2023-09-07 22:21:58'),
(6, 4, '2023-09-09', '08:35:53', '08:36:06', '08:36:24', '08:37:02', '01:01:09', '00:40:51', '00:20:18', '2023-09-08 21:35:53', '2023-09-08 21:37:02'),
(7, 2, '2023-09-11', '22:30:00', '07:16:57', '07:17:01', '09:13:28', '18:46:31', '18:46:27', '00:00:04', '2023-09-10 22:10:34', '2023-09-11 22:13:28'),
(8, 2, '2023-09-11', '22:00:00', '05:00:00', '06:00:00', '09:17:45', '05:47:45', '04:47:45', '01:00:00', '2023-09-10 22:16:20', '2023-09-11 22:17:45'),
(9, 2, '2023-09-12', '09:25:50', '09:25:57', '09:26:06', '09:26:54', '18:31:04', '18:30:55', '00:00:09', '2023-09-11 22:25:50', '2023-09-11 22:26:54'),
(10, 2, '2023-09-12', '22:00:00', '05:00:00', '06:00:00', '09:43:35', '11:43:35', '10:43:35', '01:00:00', '2023-09-11 22:42:23', '2023-09-11 22:43:35'),
(11, 2, '2023-09-12', '23:00:00', '00:00:00', '01:00:00', '09:46:57', '10:46:57', '09:46:57', '01:00:00', '2023-09-11 22:45:02', '2023-09-11 22:46:57'),
(12, 4, '2023-09-13', '12:00:00', '01:00:00', '02:00:00', '03:00:00', '03:00:42', '02:00:25', '01:00:17', '2023-09-13 01:49:05', '2023-09-22 00:07:18'),
(13, 4, '2023-09-22', '11:06:14', '11:06:29', '11:07:34', '11:07:44', '00:01:30', '00:00:25', '00:01:05', '2023-09-22 00:06:14', '2023-09-22 00:07:44'),
(14, 2, '2023-10-06', '14:20:03', '14:47:29', '14:47:31', '14:47:34', '00:27:31', '00:27:29', '00:00:02', '2023-10-06 03:20:03', '2023-10-06 03:47:34'),
(15, 2, '2023-10-06', '14:48:56', '14:48:59', '14:49:01', '14:49:04', '00:00:08', '00:00:06', '00:00:02', '2023-10-06 03:48:56', '2023-10-06 03:49:04'),
(16, 2, '2023-10-06', '15:12:53', '15:12:55', '15:12:59', '15:13:03', '00:00:10', '00:00:06', '00:00:04', '2023-10-06 04:12:53', '2023-10-06 04:13:03'),
(17, 2, '2023-10-06', '15:45:57', '15:46:03', '15:46:10', '15:49:09', '00:03:12', '00:03:05', '00:00:07', '2023-10-06 04:45:57', '2023-10-06 04:49:09'),
(18, 2, '2023-10-06', '15:48:53', '15:48:57', '15:49:02', NULL, NULL, NULL, NULL, '2023-10-06 04:48:53', '2023-10-06 04:49:02'),
(19, 2, '2023-10-06', '15:51:22', '15:51:35', '15:52:09', '15:52:17', '00:00:55', '00:00:21', '00:00:34', '2023-10-06 04:51:22', '2023-10-06 04:52:17'),
(20, 2, '2023-10-09', '09:56:35', '09:56:54', '09:57:00', '09:57:08', '00:00:33', '00:00:27', '00:00:06', '2023-10-08 22:56:35', '2023-10-08 22:57:08'),
(21, 3, '2023-10-11', '10:47:46', '10:48:00', '10:48:09', '10:48:22', '00:00:36', '00:00:27', '00:00:09', '2023-10-10 23:47:46', '2023-10-10 23:48:22');

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

--
-- Table structure for table `userprofiles`
--

CREATE TABLE `userprofiles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `permanent_id` varchar(255) DEFAULT NULL,
  `role` varchar(255) DEFAULT NULL,
  `reporting_manager` bigint(20) UNSIGNED DEFAULT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `casual_leave` varchar(255) DEFAULT NULL,
  `medical_leave` varchar(255) DEFAULT NULL,
  `phonenumber` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `hobbies` varchar(255) DEFAULT NULL,
  `deleted_at` timestamp NULL 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 `userprofiles`
--

INSERT INTO `userprofiles` (`id`, `user_id`, `permanent_id`, `role`, `reporting_manager`, `photo`, `casual_leave`, `medical_leave`, `phonenumber`, `address`, `dob`, `hobbies`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 2, NULL, 'Jr. Developer', 3, 'profilephoto/1695293082_girl1.png', '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-04 04:13:43', '2023-10-12 04:28:55'),
(2, 3, '1100191', 'Android Developer', NULL, 'profilephoto/1696589943_boy1.png', '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-04 04:49:40', '2023-10-12 04:28:31'),
(3, 4, '1192200', 'Web Developer', 2, 'profilephoto/1693900145.png', '12', '6', '9876543211', 'Anna nagar, Madurai', '2023-09-03', 'Drawing,painting', NULL, '2023-09-05 02:19:05', '2023-10-03 01:19:12'),
(4, 5, '152001', 'Android Developer', 3, 'profilephoto/1695293062_Engineer1-q9jzfn99nfmg2djb0ccq8eesjvakxw1z4ynueob8ag.png', '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-05 22:47:49', '2023-10-03 01:19:12'),
(5, 6, '152002', NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-05 22:59:42', '2023-10-03 01:19:12'),
(6, 7, NULL, NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-08 05:23:01', '2023-10-03 01:19:12'),
(7, 8, NULL, 'Web developer', NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-08 05:29:31', '2023-10-03 01:19:12'),
(9, 10, NULL, 'Web developer', 2, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-08 05:40:15', '2023-10-03 01:19:12'),
(13, 15, NULL, NULL, 2, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-12 00:16:28', '2023-10-03 01:19:12'),
(14, 16, NULL, NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-12 00:40:20', '2023-10-03 01:19:12'),
(17, 19, NULL, NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-12 02:08:45', '2023-10-03 01:19:12'),
(19, 23, NULL, NULL, 2, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-12 22:38:03', '2023-10-03 01:19:12'),
(20, 25, '1101098', 'web developer', NULL, NULL, '12', '6', '98767676767', 'Madurai', '2023-08-19', 'Drawing', NULL, '2023-09-13 00:01:59', '2023-10-03 01:19:12'),
(21, 26, NULL, NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-13 22:04:40', '2023-10-03 01:19:12'),
(22, 27, NULL, NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-15 06:04:51', '2023-10-03 01:19:12'),
(23, 28, NULL, NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-21 04:45:43', '2023-10-03 01:19:12'),
(24, 29, NULL, NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-21 04:49:24', '2023-10-03 01:19:12'),
(25, 30, '1101098', 'web developer', NULL, NULL, '12', '6', '98767676767', 'Madurai', '2023-08-19', 'Drawing', NULL, '2023-09-21 04:52:22', '2023-10-03 01:19:12'),
(26, 31, NULL, NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-21 04:58:34', '2023-10-03 01:19:12'),
(27, 1, NULL, NULL, 2, 'profilephoto/1695365985_sa.png', '12', '6', NULL, NULL, NULL, NULL, NULL, NULL, '2023-10-03 01:19:12'),
(29, 33, NULL, NULL, 2, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-24 23:58:42', '2023-10-03 01:19:12'),
(30, 34, NULL, NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-24 23:59:56', '2023-10-03 01:19:12'),
(31, 35, NULL, NULL, 2, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-25 02:08:05', '2023-10-03 01:19:12'),
(33, 37, NULL, NULL, NULL, NULL, '12', '6', NULL, NULL, NULL, NULL, NULL, '2023-09-25 05:25:19', '2023-10-03 01:19:12');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `adminleavesettings`
--
ALTER TABLE `adminleavesettings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `adminleavesettings_financial_year_foreign` (`financial_year`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

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

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

--
-- Indexes for table `leaves`
--
ALTER TABLE `leaves`
  ADD PRIMARY KEY (`id`),
  ADD KEY `leaves_leave_applicant_foreign` (`leave_applicant`);

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

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

--
-- Indexes for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`);

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

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`);

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

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

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `role_has_permissions_role_id_foreign` (`role_id`);

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

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

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

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

--
-- Indexes for table `userprofiles`
--
ALTER TABLE `userprofiles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userprofiles_user_id_foreign` (`user_id`),
  ADD KEY `userprofiles_reporting_manager_foreign` (`reporting_manager`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `adminleavesettings`
--
ALTER TABLE `adminleavesettings`
  ADD CONSTRAINT `adminleavesettings_financial_year_foreign` FOREIGN KEY (`financial_year`) REFERENCES `financialyears` (`id`);

--
-- Constraints for table `leaves`
--
ALTER TABLE `leaves`
  ADD CONSTRAINT `leaves_leave_applicant_foreign` FOREIGN KEY (`leave_applicant`) REFERENCES `users` (`id`);

--
-- Constraints for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `screenshots`
--
ALTER TABLE `screenshots`
  ADD CONSTRAINT `screenshots_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `usereducations`
--
ALTER TABLE `usereducations`
  ADD CONSTRAINT `usereducations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `userexperiences`
--
ALTER TABLE `userexperiences`
  ADD CONSTRAINT `userexperiences_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `userportals`
--
ALTER TABLE `userportals`
  ADD CONSTRAINT `userportals_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `userprofiles`
--
ALTER TABLE `userprofiles`
  ADD CONSTRAINT `userprofiles_reporting_manager_foreign` FOREIGN KEY (`reporting_manager`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `userprofiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

