-- Data for Name: competencies; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.competencies (id, name, description, level, created_at, proficiency_scale_id, category, department_id, updated_at) FROM stdin;
\.


--
-- TOC entry 5713 (class 0 OID 48848)
-- Dependencies: 252
-- Data for Name: competency_assessment_attempts; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.competency_assessment_attempts (id, assessment_id, user_id, answers, score, passed, started_at, completed_at, time_taken_seconds) FROM stdin;
\.


--
-- TOC entry 5714 (class 0 OID 48857)
-- Dependencies: 253
-- Data for Name: competency_assessment_questions; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.competency_assessment_questions (id, assessment_id, question_text, question_type, options, correct_answer, points, order_index, created_at, explanation, difficulty, media_url, media_type, updated_at) FROM stdin;
\.


--
-- TOC entry 5715 (class 0 OID 48869)
-- Dependencies: 254
-- Data for Name: competency_assessments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.competency_assessments (id, competency_id, title, description, passing_score, level_awarded, time_limit_minutes, max_attempts, is_active, created_by, created_at, updated_at, shuffle_questions, shuffle_options, questions_to_display, show_correct_answers, show_explanation, weight) FROM stdin;
\.


--
-- TOC entry 5716 (class 0 OID 48886)
-- Dependencies: 255
-- Data for Name: competency_history; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.competency_history (id, user_id, competency_id, level_before, level_after, changed_at, changed_by, notes) FROM stdin;
\.


--
-- TOC entry 5717 (class 0 OID 48894)
-- Dependencies: 256
-- Data for Name: competency_role_mapping; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.competency_role_mapping (id, competency_id, organizational_role_id, expected_level, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5718 (class 0 OID 48901)
-- Dependencies: 257
-- Data for Name: competency_validity_rules; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.competency_validity_rules (id, competency_id, job_family_id, validity_period_months, decay_rate_per_month, reassessment_required, auto_notify_days_before, is_active, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5719 (class 0 OID 48911)
-- Dependencies: 258
-- Data for Name: competency_verifications; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.competency_verifications (id, learner_id, competency_id, proposed_level, current_level, verification_type, source_id, verifier_id, status, verifier_notes, dispute_reason, verified_at, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5720 (class 0 OID 48921)
-- Dependencies: 259
-- Data for Name: competency_versions; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.competency_versions (id, competency_id, version_number, name, description, level, proficiency_scale_id, change_reason, changed_by, is_active, effective_from, effective_until, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5721 (class 0 OID 48930)
-- Dependencies: 260
-- Data for Name: content_progress; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.content_progress (id, user_id, content_id, status, progress_percentage, score, time_spent_seconds, scorm_data, started_at, completed_at, last_accessed_at) FROM stdin;
9fcd5bf6-ba51-4153-b89b-cae22c8c3627	56821a90-157d-4626-acfc-eccf24c074b8	5becdb7a-f06c-4821-bc21-0c183d81403a	completed	100	\N	4	\N	2026-04-01 14:51:24.664+05:30	2026-04-01 14:51:24.664+05:30	2026-04-01 14:51:26.714+05:30
aa6bf68d-7154-4a41-a779-ded54e3a50ac	56821a90-157d-4626-acfc-eccf24c074b8	983938ca-9890-4327-a938-94ac381fd04a	completed	100	\N	\N	\N	2026-04-01 14:51:27.87+05:30	2026-04-01 14:51:27.87+05:30	2026-04-01 14:51:27.87+05:30
d5a6cb85-a7a2-42d1-9386-34c6688f0c36	360cb5f1-42a4-4a8c-b16c-988069b90fed	5becdb7a-f06c-4821-bc21-0c183d81403a	completed	100	\N	10	\N	2026-04-01 19:59:25.706+05:30	2026-04-01 19:59:25.706+05:30	2026-04-01 19:59:33.69+05:30
cd5eb9f3-9b33-4f49-9702-5a623c6902f3	360cb5f1-42a4-4a8c-b16c-988069b90fed	983938ca-9890-4327-a938-94ac381fd04a	completed	100	\N	12	\N	2026-04-01 19:59:34.97+05:30	2026-04-01 19:59:44.45+05:30	2026-04-01 19:59:46.282+05:30
a53ba61e-f4f8-4bf5-964c-ba9a0577818c	d9e49dae-080b-41e7-9bed-e33634463f3e	18ed2d0f-bde7-44d4-9451-8c3f390bf17e	completed	100	\N	101	\N	\N	2026-04-01 14:45:22.373+05:30	2026-04-01 20:01:01.799+05:30
28885804-6e32-4705-ba3b-bc4286ce1d87	d9e49dae-080b-41e7-9bed-e33634463f3e	3ef5a6cc-8464-4011-850b-4cf6dfcc46b8	completed	100	\N	225	\N	2026-04-01 14:49:04.243+05:30	2026-04-01 20:01:03.216+05:30	2026-04-01 20:01:03.216+05:30
\.


--
-- TOC entry 5722 (class 0 OID 48940)
-- Dependencies: 261
-- Data for Name: course_bundles; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.course_bundles (id, title, description, thumbnail_url, created_by, created_at, original_price, bundle_price, is_active, updated_at) FROM stdin;
eb72476f-9a11-4a86-b100-27fdd5527b05	PhyChem		\N	82b57d97-ff21-4121-a794-352e627c95c4	2026-03-31 20:34:55.767259+05:30	10.00	10.00	t	2026-03-31 20:34:55.767259+05:30
05ec6f38-4871-4b77-8e92-8df8532174a6	BioChemistry	Desc	\N	82b57d97-ff21-4121-a794-352e627c95c4	2026-03-31 20:37:10.394806+05:30	10.00	10.00	t	2026-03-31 20:37:10.394806+05:30
\.


--
-- TOC entry 5723 (class 0 OID 48950)
-- Dependencies: 262
-- Data for Name: course_competencies; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.course_competencies (id, course_id, competency_id, job_family_id, target_level) FROM stdin;
\.


--
-- TOC entry 5724 (class 0 OID 48956)
-- Dependencies: 263
-- Data for Name: course_modules; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.course_modules (id, course_id, title, description, order_index, is_preview, created_at, updated_at) FROM stdin;
fb1cc7ea-1b0c-42ac-aa34-9604bc23f992	5b8a74d5-4d13-42c3-af9e-a25fe90055aa	Inorganic Chemistry	Desc	0	f	2026-03-30 13:12:22.159599+05:30	2026-03-30 13:12:22.159599+05:30
a0531c98-6a19-41ab-bdce-e5045aea5e42	5b8a74d5-4d13-42c3-af9e-a25fe90055aa	Hydrocarbons	Desc	1	t	2026-03-30 13:14:33.695862+05:30	2026-03-30 13:14:33.695862+05:30
44608baf-b758-4069-afe4-af6f0be35ea3	92d67d86-5d58-4321-ba98-39986abb982a	Mechanics	Desc	0	t	2026-03-30 14:11:36.273872+05:30	2026-03-30 14:12:02.199359+05:30
ea1237d8-2c8f-488b-8c69-345b07dd49f4	579bf176-4e3a-4762-b94c-3db4047c8577	Tips and tricks	Desc	0	t	2026-03-31 17:32:30.180066+05:30	2026-03-31 17:32:30.180066+05:30
e67f8c6f-7239-4c90-ac3f-12056b2e1202	ee1a028f-3703-420a-b863-181cf2a1aec4	BIo Intro	Desc	0	f	2026-04-01 14:33:01.380712+05:30	2026-04-01 14:33:01.380712+05:30
47773d9e-1523-44a8-b80f-4b84f4c4fe3d	ee1a028f-3703-420a-b863-181cf2a1aec4	Bio Crash Course	Desc	1	f	2026-04-01 14:44:19.17028+05:30	2026-04-01 14:44:19.17028+05:30
\.


--
-- TOC entry 5725 (class 0 OID 48965)
-- Dependencies: 264
-- Data for Name: course_trainers; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.course_trainers (id, course_id, trainer_id, module_id, is_lead, created_at, updated_at) FROM stdin;
9d66695f-afc9-4057-b716-e99d5f2fd319	5b8a74d5-4d13-42c3-af9e-a25fe90055aa	6531bd2e-6d62-464c-a055-a5d8141be184	\N	f	2026-03-27 16:25:31.167843+05:30	2026-03-27 16:25:31.167843+05:30
d26d7cba-40bd-4d4d-8d22-8d73961ff243	5b8a74d5-4d13-42c3-af9e-a25fe90055aa	9b954509-beba-477c-98f0-e207e5fb6a25	\N	f	2026-03-27 16:25:31.167843+05:30	2026-03-27 16:25:31.167843+05:30
4a82081d-82a3-4ce4-9ba2-4c159d9df3c4	579bf176-4e3a-4762-b94c-3db4047c8577	9b954509-beba-477c-98f0-e207e5fb6a25	\N	f	2026-03-31 17:32:44.10704+05:30	2026-03-31 17:32:44.10704+05:30
\.


--
-- TOC entry 5726 (class 0 OID 48971)
-- Dependencies: 265
-- Data for Name: course_waitlist; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.course_waitlist (id, course_id, batch_id, learner_id, nominated_by, status, priority, notes, created_at, enrolled_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5727 (class 0 OID 48980)
-- Dependencies: 266
-- Data for Name: courses; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.courses (id, title, description, thumbnail_url, duration_minutes, difficulty, is_published, created_by, created_at, updated_at, preview_video_url, image_position, certificate_template_id, short_description, long_description, delivery_mode, duration_value, duration_unit, tags, price, discount_percentage, is_mandatory, allow_self_enrollment, require_manager_approval, enable_certificates, category, subcategory, completion_min_attendance_percent, completion_require_all_assignments, completion_require_curriculum, completion_require_trainer_approval, compliance_deadline, mandatory_department_ids) FROM stdin;
579bf176-4e3a-4762-b94c-3db4047c8577	Test	deSC	/api/v1/files/download/course/0dcba9af-447b-4099-82aa-871f7048a277_RE1Mz4U_1920x1080.jpg	60	beginner	t	82b57d97-ff21-4121-a794-352e627c95c4	2026-03-30 20:38:58.752243+05:30	2026-03-31 19:08:17.495453+05:30	\N	{"x":50,"y":50,"scale":1}	\N	Mandatory for all students	<p>Desc</p>	in-class	1	hours	{}	0.00	0.00	t	\N	\N	\N	soft-skills	Problem Solving	100	t	t	f	\N	\N
92d67d86-5d58-4321-ba98-39986abb982a	Physics	Desc	/api/v1/files/download/course/997aec71-5692-45d5-87ae-8041463921e0_RE1LDMI_1920x1080.jpg	60	beginner	t	82b57d97-ff21-4121-a794-352e627c95c4	2026-03-30 13:18:23.119238+05:30	2026-04-01 14:13:52.535356+05:30	\N	{"x":50,"y":50}	\N	Mechanics	<p>Desc</p>	online	0	hours	{}	20.00	0.00	f	\N	\N	\N	\N	\N	80	t	t	t	\N	\N
5b8a74d5-4d13-42c3-af9e-a25fe90055aa	Chemistry	Organic Chemistry	/api/v1/files/download/course/310b859d-4d57-4e68-b4ba-35ed46d11696_output_barplot_trained_data.png	60	beginner	t	82b57d97-ff21-4121-a794-352e627c95c4	2026-03-26 13:36:37.734103+05:30	2026-04-01 14:32:10.059172+05:30	\N	{"x":51,"y":52}	\N	Organic Chemistry	<p>Organic Chemistry with Carbon and Hydrogen</p>	in-class	1	hours	{}	10.00	5.00	f	\N	\N	\N	product	Product Management	80	f	t	t	\N	\N
ee1a028f-3703-420a-b863-181cf2a1aec4	Biology	Desc	/api/v1/files/download/course/8be62d3a-c07a-4d79-a482-f3ac8ffbaa7e_RE1YbuV_1920x1080.jpg	60	beginner	t	82b57d97-ff21-4121-a794-352e627c95c4	2026-03-31 20:06:01.716066+05:30	2026-04-01 14:34:02.0639+05:30	\N	{"x":50,"y":50,"scale":1}	\N	Mitochondria and the Animal Kingdom	<p>Desc</p>	online	0	hours	{}	0.00	0.00	f	\N	\N	\N	\N	\N	80	f	t	t	\N	\N
\.


--
-- TOC entry 5728 (class 0 OID 49007)
-- Dependencies: 267
-- Data for Name: customer_batch_access; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.customer_batch_access (id, organization_id, batch_id, assigned_at, assigned_by) FROM stdin;
\.


--
-- TOC entry 5729 (class 0 OID 49012)
-- Dependencies: 268
-- Data for Name: customer_batch_enrollments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.customer_batch_enrollments (id, organization_id, user_id, batch_id, enrolled_at, status, completed_at) FROM stdin;
\.


--
-- TOC entry 5730 (class 0 OID 49020)
-- Dependencies: 269
-- Data for Name: customer_course_access; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.customer_course_access (id, organization_id, course_id, granted_at, granted_by, expires_at, max_enrollments) FROM stdin;
0b21e38a-ccf6-437c-8da5-370453f39057	80a419f5-1aad-4519-80b0-b0ff6e060fc9	92d67d86-5d58-4321-ba98-39986abb982a	\N	\N	2026-04-30 05:30:00+05:30	20
\.


--
-- TOC entry 5731 (class 0 OID 49025)
-- Dependencies: 270
-- Data for Name: customer_enrollments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.customer_enrollments (id, organization_id, user_id, course_id, enrolled_at, completed_at, progress_percentage, last_accessed_at) FROM stdin;
\.


--
-- TOC entry 5732 (class 0 OID 49031)
-- Dependencies: 271
-- Data for Name: customer_organizations; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.customer_organizations (id, name, slug, logo_url, primary_color, secondary_color, contact_email, contact_phone, is_active, created_at, updated_at, created_by) FROM stdin;
80a419f5-1aad-4519-80b0-b0ff6e060fc9	Mallik Corporation Ltd.	mallik-corporation		#3B82F6	#1E40AF	mallik.jumpstart@gmail.com	+919959742226	t	2026-03-31 19:13:34.744139+05:30	2026-03-31 19:13:51.197932+05:30	\N
\.


--
-- TOC entry 5733 (class 0 OID 49042)
-- Dependencies: 272
-- Data for Name: customer_portal_admins; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.customer_portal_admins (id, organization_id, user_id, role, created_at, created_by, updated_at) FROM stdin;
175ada85-c9e2-4767-b6be-860436e4fb34	80a419f5-1aad-4519-80b0-b0ff6e060fc9	82b57d97-ff21-4121-a794-352e627c95c4	admin	2026-03-31 20:42:58.65892+05:30	\N	2026-03-31 20:42:58.65892+05:30
\.


--
-- TOC entry 5734 (class 0 OID 49050)
-- Dependencies: 273
-- Data for Name: customer_portal_invitations; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.customer_portal_invitations (id, organization_id, email, full_name, invited_by, invited_at, accepted_at, user_id, status, expires_at) FROM stdin;
d0afa4a9-3ccb-4383-aa2d-7e21e44f49b9	80a419f5-1aad-4519-80b0-b0ff6e060fc9	ksmallik@gmail.com	Mallik	82b57d97-ff21-4121-a794-352e627c95c4	2026-03-31 20:41:24.814027+05:30	\N	\N	pending	\N
\.


--
-- TOC entry 5735 (class 0 OID 49059)
-- Dependencies: 274
-- Data for Name: dashboard_configurations; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.dashboard_configurations (id, user_id, role, department_id, kpi_id, is_visible, display_order, custom_config, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5736 (class 0 OID 49070)
-- Dependencies: 275
-- Data for Name: dashboard_templates; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.dashboard_templates (id, name, description, layout_config, thumbnail_url, is_default, is_active, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5737 (class 0 OID 49081)
-- Dependencies: 276
-- Data for Name: dashboard_widgets; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.dashboard_widgets (id, name, widget_type, component_name, default_config, available_for_roles, category, is_active, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5738 (class 0 OID 49092)
-- Dependencies: 277
-- Data for Name: data_export_requests; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.data_export_requests (id, user_id, status, export_url, requested_at, completed_at, expires_at) FROM stdin;
\.


--
-- TOC entry 5739 (class 0 OID 49101)
-- Dependencies: 278
-- Data for Name: department_competency_levels; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.department_competency_levels (id, department_id, competency_id, expected_level, created_at, created_by, updated_at) FROM stdin;
\.


--
-- TOC entry 5740 (class 0 OID 49109)
-- Dependencies: 279
-- Data for Name: departments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.departments (id, name, description, created_at, parent_id, level, head_user_id, code, is_active, updated_at) FROM stdin;
f86e151f-67e2-4e4d-8a9f-49eff88c96ec	Recruitment	Desc	2026-03-31 18:14:47.401731+05:30	1733c901-4856-419f-895f-927e30f3f4ac	2	\N	REC	t	2026-03-31 18:14:47.401731+05:30
be2aa915-d90a-44ff-9815-d35238746c12	Engineering	\N	2026-03-23 11:47:54.256303+05:30	\N	1	82b57d97-ff21-4121-a794-352e627c95c4	ENG	t	2026-03-31 18:14:57.027145+05:30
5a83a62a-8353-4776-8c4c-77f489e4035e	Information Technology	Desc	2026-03-31 18:15:35.89138+05:30	be2aa915-d90a-44ff-9815-d35238746c12	2	82b57d97-ff21-4121-a794-352e627c95c4	ENG	t	2026-03-31 18:15:35.89138+05:30
1733c901-4856-419f-895f-927e30f3f4ac	Human Resources	Desc	2026-03-31 18:13:37.294149+05:30	\N	1	50e5aa4e-e0bb-471d-9ce5-69a33aae63d2	HR	t	2026-03-31 19:40:44.911781+05:30
\.


--
-- TOC entry 5741 (class 0 OID 49119)
-- Dependencies: 280
-- Data for Name: designation_competencies; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.designation_competencies (id, designation_id, competency_id, required_level, is_mandatory, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5742 (class 0 OID 49126)
-- Dependencies: 281
-- Data for Name: designations; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.designations (id, name, code, description, department_id, band_level, hierarchy_level, is_department_head, is_active, created_by, created_at, updated_at) FROM stdin;
bcf69dc3-3407-404f-bd52-a3c88dde26b6	Junior Software Developer	JDE	Desc	5a83a62a-8353-4776-8c4c-77f489e4035e	L1	1	f	t	\N	2026-03-31 18:19:54.973361+05:30	2026-03-31 18:19:54.973361+05:30
32c9aaaa-64f4-4ad9-91c2-db7b06312c4b	Senior Software Engineer	SSE	Desc	5a83a62a-8353-4776-8c4c-77f489e4035e	Executive	1	t	t	\N	2026-03-31 18:20:31.041851+05:30	2026-03-31 18:25:47.387017+05:30
\.


--
-- TOC entry 5743 (class 0 OID 49137)
-- Dependencies: 282
-- Data for Name: employee_assignments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.employee_assignments (id, user_id, department_id, designation_id, reports_to_id, is_primary, effective_from, effective_until, is_active, created_by, created_at, updated_at) FROM stdin;
b7a02457-c085-4131-b4d9-206bb3c9c145	6bd17ff7-6568-4789-bd7e-0b9b057eb5fe	5a83a62a-8353-4776-8c4c-77f489e4035e	bcf69dc3-3407-404f-bd52-a3c88dde26b6	50e5aa4e-e0bb-471d-9ce5-69a33aae63d2	t	\N	\N	t	\N	2026-03-31 18:44:01.572917+05:30	2026-03-31 18:44:01.572917+05:30
8710f2c4-0fdb-4bb5-8eb3-df6885ec8094	56821a90-157d-4626-acfc-eccf24c074b8	5a83a62a-8353-4776-8c4c-77f489e4035e	32c9aaaa-64f4-4ad9-91c2-db7b06312c4b	82b57d97-ff21-4121-a794-352e627c95c4	t	\N	\N	t	\N	2026-03-31 18:44:23.182811+05:30	2026-03-31 18:44:23.182811+05:30
87113f0e-9600-4a98-874f-5956e59eafab	360cb5f1-42a4-4a8c-b16c-988069b90fed	be2aa915-d90a-44ff-9815-d35238746c12	bcf69dc3-3407-404f-bd52-a3c88dde26b6	\N	t	\N	\N	t	\N	2026-03-31 18:47:37.486843+05:30	2026-03-31 18:47:37.486843+05:30
\.


--
-- TOC entry 5744 (class 0 OID 49146)
-- Dependencies: 283
-- Data for Name: enrollment_requests; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.enrollment_requests (id, user_id, course_id, manager_id, status, request_notes, review_notes, requested_at, reviewed_at, reviewed_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5745 (class 0 OID 49156)
-- Dependencies: 284
-- Data for Name: enrollments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.enrollments (id, user_id, course_id, batch_id, progress_percentage, status, enrolled_at, completed_at, completion_approved_by, completion_approved_at, nominated_by) FROM stdin;
aa0cfea6-09e0-4ba3-80b7-17e71177c2a2	6bd17ff7-6568-4789-bd7e-0b9b057eb5fe	5b8a74d5-4d13-42c3-af9e-a25fe90055aa	6df7e3c2-8add-4545-aa2d-fbd3a5a9d897	\N	\N	2026-03-31 13:46:43.787435+05:30	\N	\N	\N	\N
0ef0fcb3-2700-47f6-8b27-32ba8bcb7d66	56821a90-157d-4626-acfc-eccf24c074b8	5b8a74d5-4d13-42c3-af9e-a25fe90055aa	6df7e3c2-8add-4545-aa2d-fbd3a5a9d897	\N	\N	2026-03-31 13:46:43.787364+05:30	\N	\N	\N	\N
93a788ba-58c2-40b5-b6bc-8243ab92cebc	2dbf29ad-bb2d-4ff7-ba7a-6cb61d325b47	5b8a74d5-4d13-42c3-af9e-a25fe90055aa	6df7e3c2-8add-4545-aa2d-fbd3a5a9d897	\N	\N	2026-03-31 13:47:05.065235+05:30	\N	\N	\N	\N
4463a70e-adc1-4887-9439-c4fec4c52c06	2dbf29ad-bb2d-4ff7-ba7a-6cb61d325b47	92d67d86-5d58-4321-ba98-39986abb982a	4ac72f4e-b51b-4c54-9868-8b202c568e50	\N	\N	2026-03-31 16:55:40.793097+05:30	\N	\N	\N	\N
e9a36ed7-e4c2-444e-8d41-51dbe05befe0	6bd17ff7-6568-4789-bd7e-0b9b057eb5fe	92d67d86-5d58-4321-ba98-39986abb982a	4ac72f4e-b51b-4c54-9868-8b202c568e50	\N	\N	2026-03-31 16:55:40.793097+05:30	\N	\N	\N	\N
00569bff-950d-4034-9a9c-3e4290045286	d9e49dae-080b-41e7-9bed-e33634463f3e	5b8a74d5-4d13-42c3-af9e-a25fe90055aa	6df7e3c2-8add-4545-aa2d-fbd3a5a9d897	\N	\N	2026-03-31 16:59:46.670169+05:30	\N	\N	\N	\N
0c35980f-ee27-4bc9-912c-22617c5cef51	6bd17ff7-6568-4789-bd7e-0b9b057eb5fe	579bf176-4e3a-4762-b94c-3db4047c8577	\N	0	enrolled	2026-03-31 17:18:35.177337+05:30	\N	\N	\N	\N
d66f92d1-5adc-42ed-8c65-afefca543784	56821a90-157d-4626-acfc-eccf24c074b8	579bf176-4e3a-4762-b94c-3db4047c8577	\N	0	enrolled	2026-03-31 17:18:35.177337+05:30	\N	\N	\N	\N
928f1c4e-242b-4e7f-b1fc-07a00675d808	360cb5f1-42a4-4a8c-b16c-988069b90fed	579bf176-4e3a-4762-b94c-3db4047c8577	\N	0	enrolled	2026-03-31 17:18:35.177337+05:30	\N	\N	\N	\N
beb6f646-d490-4e08-a565-159cca2d2fe2	d9e49dae-080b-41e7-9bed-e33634463f3e	579bf176-4e3a-4762-b94c-3db4047c8577	\N	0	enrolled	2026-03-31 17:18:35.177337+05:30	\N	\N	\N	\N
675d4ee4-a32f-45a4-9368-a0fd30d4668f	2dbf29ad-bb2d-4ff7-ba7a-6cb61d325b47	579bf176-4e3a-4762-b94c-3db4047c8577	\N	0	enrolled	2026-03-31 17:18:35.177337+05:30	\N	\N	\N	\N
df21e27c-0d69-4f09-824b-a3811f00a36c	56821a90-157d-4626-acfc-eccf24c074b8	92d67d86-5d58-4321-ba98-39986abb982a	4ac72f4e-b51b-4c54-9868-8b202c568e50	0	\N	2026-03-31 16:55:40.793097+05:30	\N	\N	\N	\N
237befeb-dffe-468c-8bbe-439fe1702c8c	d9e49dae-080b-41e7-9bed-e33634463f3e	ee1a028f-3703-420a-b863-181cf2a1aec4	9d23a3e1-bdda-42de-b65b-7b7ed1640174	100	completed	2026-04-01 14:19:31.400365+05:30	2026-04-01 19:04:22.320958+05:30	\N	\N	\N
8ccdf818-2546-4412-8e11-ca07ede0fe12	360cb5f1-42a4-4a8c-b16c-988069b90fed	92d67d86-5d58-4321-ba98-39986abb982a	4ac72f4e-b51b-4c54-9868-8b202c568e50	100	completed	2026-03-31 13:41:38.755566+05:30	2026-04-01 19:59:44.456601+05:30	\N	\N	\N
\.


--
-- TOC entry 5746 (class 0 OID 49165)
-- Dependencies: 285
-- Data for Name: external_assessment_results; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.external_assessment_results (id, external_assessment_id, user_id, score, passed, raw_data, completed_at, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5747 (class 0 OID 49174)
-- Dependencies: 286
-- Data for Name: external_assessments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.external_assessments (id, title, description, provider, assessment_url, embed_code, integration_type, competency_id, passing_score, level_awarded, is_active, config_data, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5748 (class 0 OID 49188)
-- Dependencies: 287
-- Data for Name: external_user_profiles; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.external_user_profiles (id, user_id, organization_id, external_user_type, company_name, phone_number, external_employee_id, metadata, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5749 (class 0 OID 49198)
-- Dependencies: 288
-- Data for Name: feedback_analytics; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.feedback_analytics (id, template_id, question_id, course_id, batch_id, period_start, period_end, total_responses, average_score, score_distribution, nps_score, updated_at, created_at) FROM stdin;
\.


--
-- TOC entry 5750 (class 0 OID 49207)
-- Dependencies: 289
-- Data for Name: feedback_questions; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.feedback_questions (id, template_id, question_text, question_type, options, is_required, order_index, settings, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5751 (class 0 OID 49220)
-- Dependencies: 290
-- Data for Name: feedback_response_answers; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.feedback_response_answers (id, response_id, question_id, answer_value, answer_text, answer_array, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5752 (class 0 OID 49227)
-- Dependencies: 291
-- Data for Name: feedback_responses; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.feedback_responses (id, template_id, trigger_id, user_id, course_id, batch_id, module_id, session_id, is_anonymous, submitted_at) FROM stdin;
\.


--
-- TOC entry 5753 (class 0 OID 49233)
-- Dependencies: 292
-- Data for Name: feedback_templates; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.feedback_templates (id, title, description, template_type, is_anonymous, is_active, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5754 (class 0 OID 49245)
-- Dependencies: 293
-- Data for Name: feedback_triggers; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.feedback_triggers (id, template_id, trigger_type, target_type, target_id, trigger_config, is_active, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5755 (class 0 OID 49256)
-- Dependencies: 294
-- Data for Name: gap_assignment_rules; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.gap_assignment_rules (id, gap_min, gap_max, assignment_type, assignment_intensity, description, auto_assign_enabled, notify_manager, notify_learner, include_ai_recommendations, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5756 (class 0 OID 49273)
-- Dependencies: 295
-- Data for Name: help_article_media; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.help_article_media (id, article_id, media_type, url, caption, order_index, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5757 (class 0 OID 49282)
-- Dependencies: 296
-- Data for Name: help_article_sections; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.help_article_sections (id, article_id, title, content, is_collapsible, is_expanded_by_default, order_index, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5758 (class 0 OID 49292)
-- Dependencies: 297
-- Data for Name: help_article_steps; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.help_article_steps (id, article_id, step_number, title, description, image_url, video_url, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5759 (class 0 OID 49299)
-- Dependencies: 298
-- Data for Name: help_articles; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.help_articles (id, category_id, title, description, content, keywords, is_published, view_count, order_index, created_at, updated_at, created_by, updated_by) FROM stdin;
\.


--
-- TOC entry 5760 (class 0 OID 49311)
-- Dependencies: 299
-- Data for Name: help_categories; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.help_categories (id, name, description, icon, order_index, is_active, created_at, updated_at, created_by) FROM stdin;
\.


--
-- TOC entry 5761 (class 0 OID 49322)
-- Dependencies: 300
-- Data for Name: help_related_articles; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.help_related_articles (id, article_id, related_article_id, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5762 (class 0 OID 49328)
-- Dependencies: 301
-- Data for Name: hrms_configurations; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.hrms_configurations (id, hrms_type, name, is_active, config_data, last_sync_at, created_at, updated_at, created_by) FROM stdin;
\.


--
-- TOC entry 5763 (class 0 OID 49339)
-- Dependencies: 302
-- Data for Name: hrms_sync_logs; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.hrms_sync_logs (id, sync_type, source_system, status, total_records, successful_records, failed_records, error_details, sync_data, started_at, completed_at, triggered_by, created_at, updated_at) FROM stdin;
557a6267-9897-4d9b-a88e-62cbfd890e90	webhook	test-hrms	processing	1	\N	\N	\N	\N	2026-03-23 11:38:53.262062+05:30	\N	\N	2026-03-23 11:38:53.299345+05:30	2026-03-23 11:38:53.299345+05:30
94a8e41b-50b5-48b8-a59e-62da9f5cd90d	webhook	test-hrms	processing	1	\N	\N	\N	\N	2026-03-23 11:39:36.296811+05:30	\N	\N	2026-03-23 11:39:36.33391+05:30	2026-03-23 11:39:36.33391+05:30
b2d36dc4-ba9e-4004-b02b-700924795cd4	webhook	test-hrms	processing	1	\N	\N	\N	\N	2026-03-23 11:41:47.172116+05:30	\N	\N	2026-03-23 11:41:47.211209+05:30	2026-03-23 11:41:47.211209+05:30
c7a1b4d4-c657-4de6-bdf7-486a2206c081	webhook	test-hrms	processing	1	\N	\N	\N	\N	2026-03-23 11:42:26.068397+05:30	\N	\N	2026-03-23 11:42:26.103924+05:30	2026-03-23 11:42:26.103924+05:30
a2c3214c-9619-42a7-a011-be8c685da36f	webhook	test-hrms	processing	0	\N	\N	\N	\N	2026-03-23 11:43:19.851093+05:30	\N	\N	2026-03-23 11:43:19.887899+05:30	2026-03-23 11:43:19.887899+05:30
ad6c15f8-3f25-444f-95d7-77d5807dd7aa	webhook	test-hrms	processing	0	\N	\N	\N	\N	2026-03-23 11:44:00.708645+05:30	\N	\N	2026-03-23 11:44:00.763914+05:30	2026-03-23 11:44:00.763914+05:30
c26e94a1-7fa5-4163-9e78-a0eaf8c8a619	webhook	test-hrms	processing	1	\N	\N	\N	\N	2026-03-23 11:45:42.797781+05:30	\N	\N	2026-03-23 11:45:42.836269+05:30	2026-03-23 11:45:42.836269+05:30
2452bcea-b6eb-4424-8d3f-517b31af9146	webhook	test-hrms	processing	1	\N	\N	\N	\N	2026-03-23 11:46:07.446949+05:30	\N	\N	2026-03-23 11:46:07.448808+05:30	2026-03-23 11:46:07.448808+05:30
d1d7bf2e-7b37-4583-9010-e99cb6d830f4	webhook	test-hrms	failed	1	0	1	[{"employee_id":"EMP001","error":"could not execute statement [ERROR: schema \\"auth\\" does not exist\\n  Where: PL/pgSQL function log_org_structure_change() line 4 at SQL statement] [insert into departments (code,created_at,description,head_user_id,is_active,level,name,parent_id,updated_at,id) values (?,?,?,?,?,?,?,?,?,?)]","email":"newuser@example.com"}]	\N	2026-03-23 11:46:50.209705+05:30	2026-03-23 11:46:50.21771+05:30	\N	2026-03-23 11:46:50.211502+05:30	2026-03-23 11:46:50.219414+05:30
7d147392-2385-4181-84bb-ebf10e1c7b10	webhook	test-hrms	failed	1	0	1	[{"employee_id":"EMP001","error":"could not execute statement [ERROR: null value in column \\"created_at\\" of relation \\"user_roles\\" violates not-null constraint\\n  Detail: Failing row contains (9c3f74da-a82e-4767-ba51-4d3c72f9afde, aac65864-1100-49c9-84df-95340403ceb7, learner, null, null).] [insert into user_roles (created_at,department_id,role,user_id,id) values (?,?,?,?,?)]; SQL [insert into user_roles (created_at,department_id,role,user_id,id) values (?,?,?,?,?)]; constraint [created_at\\" of relation \\"user_roles]","email":"newuser@example.com"}]	\N	2026-03-23 11:47:54.249374+05:30	2026-03-23 11:47:54.277066+05:30	\N	2026-03-23 11:47:54.25138+05:30	2026-03-23 11:47:54.279159+05:30
fd0c6483-e33c-49c8-b130-6a05045e56ab	webhook	test-hrms	completed	1	1	0	[]	\N	2026-03-23 11:49:20.668333+05:30	2026-03-23 11:49:20.789672+05:30	\N	2026-03-23 11:49:20.710208+05:30	2026-03-23 11:49:20.795285+05:30
\.


--
-- TOC entry 5764 (class 0 OID 49354)
-- Dependencies: 303
-- Data for Name: inferred_skills; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.inferred_skills (id, user_id, competency_id, inferred_level, confidence_score, evidence, last_updated, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5765 (class 0 OID 49365)
-- Dependencies: 304
-- Data for Name: issued_certificates; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.issued_certificates (id, user_id, course_id, enrollment_id, learner_name, learner_email, course_title, completion_date, issued_at, template_id, certificate_number, verification_code, is_revoked, revoked_at, revoked_by, revoke_reason) FROM stdin;
\.


--
-- TOC entry 5766 (class 0 OID 49373)
-- Dependencies: 305
-- Data for Name: job_families; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.job_families (id, name, description, created_at, created_by, updated_at) FROM stdin;
\.


--
-- TOC entry 5767 (class 0 OID 49381)
-- Dependencies: 306
-- Data for Name: job_family_competencies; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.job_family_competencies (id, job_family_id, competency_id, expected_level, created_at, created_by, updated_at) FROM stdin;
\.


--
-- TOC entry 5768 (class 0 OID 49387)
-- Dependencies: 307
-- Data for Name: kpi_definitions; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.kpi_definitions (id, name, description, kpi_key, visualization_type, data_source, default_config, is_active, display_order, category, required_role, created_at, updated_at, target_dashboards) FROM stdin;
fc56b1b3-41f9-4e9b-882c-7416f463d1c6	Completion Rate	Desc	completion_rate	kpi_card	enrollments	\N	t	0	general	\N	2026-03-23 19:11:50.118654+05:30	2026-04-01 14:40:38.333456+05:30	["main_dashboard"]
\.


--
-- TOC entry 5769 (class 0 OID 49402)
-- Dependencies: 308
-- Data for Name: landing_pages; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.landing_pages (id, title, slug, description, is_published, is_homepage, seo_title, seo_description, seo_keywords, og_image_url, header_menu_id, footer_menu_id, created_by, created_at, updated_at) FROM stdin;
4ad81aaf-0d4c-409d-9514-13ad7f63e74a	Landing Page	landing	\N	f	t	\N	\N	\N	\N	\N	\N	\N	2026-03-31 19:33:50.496137+05:30	2026-03-31 19:33:50.496137+05:30
\.


--
-- TOC entry 5770 (class 0 OID 49412)
-- Dependencies: 309
-- Data for Name: learner_badges; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learner_badges (id, user_id, badge_id, earned_at, awarded_by) FROM stdin;
efc974fc-ce98-42ee-b58b-e338fbd1dc0e	360cb5f1-42a4-4a8c-b16c-988069b90fed	4416d994-8799-42c6-8466-a9208ec99e79	2026-04-01 19:59:34.992744+05:30	\N
a72bf64d-3cc6-419f-a8eb-d513ce39e946	360cb5f1-42a4-4a8c-b16c-988069b90fed	af50eee5-62b4-4079-a9db-5cbdca2ab9fe	2026-04-01 19:59:44.467152+05:30	\N
\.


--
-- TOC entry 5771 (class 0 OID 49417)
-- Dependencies: 310
-- Data for Name: learner_competency_progress; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learner_competency_progress (id, user_id, competency_id, current_level, target_level, assessed_at, assessed_by, notes, created_at, updated_at, target_date, target_source) FROM stdin;
\.


--
-- TOC entry 5772 (class 0 OID 49426)
-- Dependencies: 311
-- Data for Name: learner_competency_scores; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learner_competency_scores (id, user_id, competency_id, weighted_score, total_assessments, last_assessment_at, calculated_level, ai_recommended_level, ai_confidence_score, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5773 (class 0 OID 49437)
-- Dependencies: 312
-- Data for Name: learner_learning_paths; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learner_learning_paths (id, user_id, learning_path_id, assigned_at, assigned_by, started_at, completed_at, status, progress_percentage) FROM stdin;
\.


--
-- TOC entry 5774 (class 0 OID 49446)
-- Dependencies: 313
-- Data for Name: learner_notes; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learner_notes (id, user_id, module_id, content, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5775 (class 0 OID 49454)
-- Dependencies: 314
-- Data for Name: learner_notifications; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learner_notifications (id, user_id, title, message, notification_type, is_read, is_dismissed, related_course_id, created_at, created_by, updated_at) FROM stdin;
b986fd77-d71d-45c1-85da-9222d9967a0a	360cb5f1-42a4-4a8c-b16c-988069b90fed	New Achievement Unlocked!	Congratulations! You've earned the 'Module Completed' badge.	achievement	f	f	\N	2026-04-01 19:59:34.999231+05:30	\N	2026-04-01 19:59:34.999231+05:30
b61de61f-90b2-49e5-8940-807a929d2fc0	360cb5f1-42a4-4a8c-b16c-988069b90fed	New Achievement Unlocked!	Congratulations! You've earned the 'Course Complete' badge.	achievement	f	f	\N	2026-04-01 19:59:44.469789+05:30	\N	2026-04-01 19:59:44.469789+05:30
\.


--
-- TOC entry 5776 (class 0 OID 49464)
-- Dependencies: 315
-- Data for Name: learner_points; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learner_points (id, user_id, total_points, current_streak, longest_streak, last_activity_date, updated_at, created_at) FROM stdin;
\.


--
-- TOC entry 5777 (class 0 OID 49472)
-- Dependencies: 316
-- Data for Name: learning_activity_log; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learning_activity_log (id, user_id, activity_type, course_id, content_id, session_duration_seconds, activity_date, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5778 (class 0 OID 49481)
-- Dependencies: 317
-- Data for Name: learning_path_ai_metadata; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learning_path_ai_metadata (id, learning_path_id, generation_prompt, target_role_id, target_competencies, estimated_completion_weeks, difficulty_progression, ai_model_used, generated_at, last_optimized_at, optimization_notes) FROM stdin;
\.


--
-- TOC entry 5779 (class 0 OID 49489)
-- Dependencies: 318
-- Data for Name: learning_path_courses; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learning_path_courses (id, learning_path_id, course_id, order_index, is_required) FROM stdin;
b9169f6c-c5a4-4dca-a26c-bf61a74ab949	db20781d-21c0-4ddd-927f-91b1dc6878e3	92d67d86-5d58-4321-ba98-39986abb982a	0	t
b2ceaad8-a6fa-488f-9f0d-069b8818f8a3	db20781d-21c0-4ddd-927f-91b1dc6878e3	5b8a74d5-4d13-42c3-af9e-a25fe90055aa	1	t
\.


--
-- TOC entry 5780 (class 0 OID 49495)
-- Dependencies: 319
-- Data for Name: learning_paths; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.learning_paths (id, title, description, thumbnail_url, target_competency_id, created_by, created_at, updated_at, is_published) FROM stdin;
db20781d-21c0-4ddd-927f-91b1dc6878e3	Sureshot	Desc	\N	\N	82b57d97-ff21-4121-a794-352e627c95c4	2026-03-31 20:35:39.51536+05:30	2026-03-31 20:35:39.51536+05:30	f
\.


--
-- TOC entry 5781 (class 0 OID 49502)
-- Dependencies: 320
-- Data for Name: live_annotations; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.live_annotations (id, session_id, content_id, annotator_id, annotation_type, annotation_data, timestamp_seconds, is_visible, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5782 (class 0 OID 49510)
-- Dependencies: 321
-- Data for Name: meeting_integrations; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.meeting_integrations (id, name, provider, client_id, client_secret, api_key, api_secret, access_token, refresh_token, token_expires_at, webhook_secret, is_active, config_data, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5783 (class 0 OID 49521)
-- Dependencies: 322
-- Data for Name: mentor_learners; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.mentor_learners (id, batch_id, mentor_id, learner_id, assigned_at, assigned_by) FROM stdin;
4cf24490-b809-4daf-b3fb-eb4103c696d9	4ac72f4e-b51b-4c54-9868-8b202c568e50	82b57d97-ff21-4121-a794-352e627c95c4	56821a90-157d-4626-acfc-eccf24c074b8	2026-03-31 17:12:26.030859+05:30	82b57d97-ff21-4121-a794-352e627c95c4
bdc710e9-4f8b-42e1-8f19-68130aa9dc26	6df7e3c2-8add-4545-aa2d-fbd3a5a9d897	50e5aa4e-e0bb-471d-9ce5-69a33aae63d2	d9e49dae-080b-41e7-9bed-e33634463f3e	2026-03-31 17:12:43.914043+05:30	82b57d97-ff21-4121-a794-352e627c95c4
20622f73-ae37-4ebe-91e3-bf75cc459f30	4ac72f4e-b51b-4c54-9868-8b202c568e50	82b57d97-ff21-4121-a794-352e627c95c4	360cb5f1-42a4-4a8c-b16c-988069b90fed	2026-03-31 17:12:26.030859+05:30	82b57d97-ff21-4121-a794-352e627c95c4
929cbdfc-cd8a-49e9-a7ce-6df1210f62e1	6df7e3c2-8add-4545-aa2d-fbd3a5a9d897	50e5aa4e-e0bb-471d-9ce5-69a33aae63d2	56821a90-157d-4626-acfc-eccf24c074b8	2026-03-31 17:12:43.914043+05:30	82b57d97-ff21-4121-a794-352e627c95c4
172da6a9-328b-4084-ad41-6512147974a2	6df7e3c2-8add-4545-aa2d-fbd3a5a9d897	50e5aa4e-e0bb-471d-9ce5-69a33aae63d2	6bd17ff7-6568-4789-bd7e-0b9b057eb5fe	2026-03-31 17:13:11.778055+05:30	82b57d97-ff21-4121-a794-352e627c95c4
6b9e8f71-265c-4567-b7e4-ba56f222a887	4ac72f4e-b51b-4c54-9868-8b202c568e50	82b57d97-ff21-4121-a794-352e627c95c4	6bd17ff7-6568-4789-bd7e-0b9b057eb5fe	2026-03-31 17:12:26.030859+05:30	82b57d97-ff21-4121-a794-352e627c95c4
1b9d1580-f36f-4948-86b1-c6a4df616b61	4ac72f4e-b51b-4c54-9868-8b202c568e50	82b57d97-ff21-4121-a794-352e627c95c4	2dbf29ad-bb2d-4ff7-ba7a-6cb61d325b47	2026-03-31 17:12:26.030859+05:30	82b57d97-ff21-4121-a794-352e627c95c4
\.


--
-- TOC entry 5784 (class 0 OID 49526)
-- Dependencies: 323
-- Data for Name: microlearning_assignments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.microlearning_assignments (id, microlearning_id, user_id, assigned_by, assigned_at) FROM stdin;
\.


--
-- TOC entry 5785 (class 0 OID 49531)
-- Dependencies: 324
-- Data for Name: microlearning_content; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.microlearning_content (id, title, description, content_type, duration_minutes, thumbnail_url, content_url, content_data, xp_reward, is_universal, is_active, course_id, created_by, created_at, updated_at, department_id) FROM stdin;
ef956300-f5bc-484a-8193-c4ae9985a477	5 Tips for Better Communication	Brief Description	article	5	/api/v1/files/download/microlearning/b3d73ac9-afe4-4d89-961a-76cdb75bdd88_query-builder.png	\N	{"html_content":""}	10	t	t	\N	d32fe6b6-4ffa-4e23-a6dd-d90d88cc491d	2026-03-23 18:14:01.629012+05:30	2026-03-30 17:24:47.892924+05:30	\N
1d2ca92f-fa56-4db8-b3eb-d742f14b7d3f	Tip 2	Desc	article	5	/api/v1/files/download/microlearning/66654f16-da62-4d5b-bcd4-cd32f2ee3567_color_header.png	\N	{"html_content":""}	10	f	t	\N	82b57d97-ff21-4121-a794-352e627c95c4	2026-03-25 19:13:16.919256+05:30	2026-03-30 17:26:25.607918+05:30	\N
\.


--
-- TOC entry 5786 (class 0 OID 49546)
-- Dependencies: 325
-- Data for Name: microlearning_progress; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.microlearning_progress (id, microlearning_id, user_id, started_at, completed_at, xp_awarded) FROM stdin;
\.


--
-- TOC entry 5787 (class 0 OID 49552)
-- Dependencies: 326
-- Data for Name: module_content; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.module_content (id, module_id, title, content_type, content_url, content_data, duration_minutes, order_index, is_preview, scorm_version, created_at, updated_at) FROM stdin;
076ec0fc-a5de-4820-aeab-342aec031fa7	fb1cc7ea-1b0c-42ac-aa34-9604bc23f992	IC	pdf	\N	\N	10	0	f	\N	2026-03-30 13:13:37.203+05:30	2026-03-30 13:13:37.203+05:30
5becdb7a-f06c-4821-bc21-0c183d81403a	44608baf-b758-4069-afe4-af6f0be35ea3	Mechanics	pdf	\N	\N	10	0	f	\N	2026-03-30 14:12:27.51178+05:30	2026-03-30 14:12:27.51178+05:30
983938ca-9890-4327-a938-94ac381fd04a	44608baf-b758-4069-afe4-af6f0be35ea3	Mechanics	pdf	/api/v1/files/download/material/48974378-5c49-4df3-b20d-c58ed4e25248_Become a Genius (2nd Edition) · Secrets to Increase Your Brain Power, Speed Reading, Learning Efficiency, and Advanced Memory ·... (Guerrero, Marco) (Z-Library).epub	\N	10	0	f	\N	2026-03-30 14:13:53.035749+05:30	2026-03-30 14:13:53.035749+05:30
681a8961-0dc4-477b-96c6-27f78bf605d0	fb1cc7ea-1b0c-42ac-aa34-9604bc23f992	Lesson1	pdf	/api/v1/files/download/material/5f5d1411-1095-43b9-8903-b5fa15b79634_The Key To Study Skills Simple Strategies to Double Your Reading, Memory, and Focus (Lev Goldenouch, Anna Goldentouch, Suraj Sharma) (Z-Library).epub	\N	10	0	t	\N	2026-04-01 14:24:45.689652+05:30	2026-04-01 14:24:45.689652+05:30
375f162b-42b7-46f1-8273-c8453ba33977	fb1cc7ea-1b0c-42ac-aa34-9604bc23f992	Content	pdf	/api/v1/files/download/material/3a30c097-03d9-44b6-8fa1-b376a6922324_kemh1sm.pdf	\N	10	0	t	\N	2026-04-01 14:26:01.931938+05:30	2026-04-01 14:26:01.931938+05:30
dcf17314-001e-4c99-b320-63ae635b3be5	a0531c98-6a19-41ab-bdce-e5045aea5e42	Organic Stuff	pdf	/api/v1/files/download/material/755d9bed-8609-4385-838b-3832e14675a2_kemh1a2.pdf	\N	10	0	t	\N	2026-04-01 14:31:24.989699+05:30	2026-04-01 14:31:24.989699+05:30
3ef5a6cc-8464-4011-850b-4cf6dfcc46b8	e67f8c6f-7239-4c90-ac3f-12056b2e1202	Bio introduction	pdf	\N	\N	10	0	f	\N	2026-04-01 14:33:22.97905+05:30	2026-04-01 14:33:22.97905+05:30
18ed2d0f-bde7-44d4-9451-8c3f390bf17e	47773d9e-1523-44a8-b80f-4b84f4c4fe3d	Bio related	video	https://www.youtube.com/watch?v=tZE_fQFK8EY&pp=ygUHYmlvbG9neQ%3D%3D	\N	14	0	t	\N	2026-04-01 14:44:45.563183+05:30	2026-04-01 14:44:45.563183+05:30
efe451aa-26a2-4959-b173-01c6459fa8a1	ea1237d8-2c8f-488b-8c69-345b07dd49f4	University Mandatory Lesson	video	https://www.youtube.com/shorts/nsg6cNPO4DQ	\N	10	0	t	\N	2026-03-31 17:35:32.845668+05:30	2026-04-01 14:55:58.093175+05:30
\.


--
-- TOC entry 5788 (class 0 OID 49562)
-- Dependencies: 327
-- Data for Name: navigation_items; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.navigation_items (id, menu_id, parent_id, label, url, page_id, target, icon, order_index, is_visible, created_at) FROM stdin;
\.


--
-- TOC entry 5789 (class 0 OID 49572)
-- Dependencies: 328
-- Data for Name: navigation_menus; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.navigation_menus (id, name, location, is_active, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5790 (class 0 OID 49581)
-- Dependencies: 329
-- Data for Name: okr_competency_links; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.okr_competency_links (id, okr_id, competency_id, weight, target_level, created_at) FROM stdin;
\.


--
-- TOC entry 5791 (class 0 OID 49587)
-- Dependencies: 330
-- Data for Name: okrs; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.okrs (id, title, description, okr_type, parent_id, owner_id, owner_type, target_value, current_value, unit, start_date, end_date, status, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5792 (class 0 OID 49599)
-- Dependencies: 331
-- Data for Name: org_structure_audit; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.org_structure_audit (id, entity_type, entity_id, action, old_values, new_values, changed_by, changed_at, notes) FROM stdin;
5f5e4836-5076-4d4c-ae11-e9e89fc436a4	departments	be2aa915-d90a-44ff-9815-d35238746c12	create	\N	{"id": "be2aa915-d90a-44ff-9815-d35238746c12", "code": null, "name": "Engineering", "level": null, "is_active": null, "parent_id": null, "created_at": "2026-03-23T11:47:54.256303+05:30", "updated_at": "2026-03-23T11:47:54.256303+05:30", "description": null, "head_user_id": null}	\N	2026-03-23 11:47:54.255859+05:30	\N
a7ffb929-7b37-4c26-bd73-27c4caf04340	departments	be2aa915-d90a-44ff-9815-d35238746c12	update	{"id": "be2aa915-d90a-44ff-9815-d35238746c12", "code": null, "name": "Engineering", "level": null, "is_active": null, "parent_id": null, "created_at": "2026-03-23T11:47:54.256303+05:30", "updated_at": "2026-03-23T11:47:54.256303+05:30", "description": null, "head_user_id": null}	{"id": "be2aa915-d90a-44ff-9815-d35238746c12", "code": null, "name": "Engineering", "level": 1, "is_active": null, "parent_id": null, "created_at": "2026-03-23T11:47:54.256303+05:30", "updated_at": "2026-03-23T11:47:54.256303+05:30", "description": null, "head_user_id": null}	\N	2026-03-31 18:11:55.533645+05:30	\N
d38f8d37-1a7e-4e20-b331-8c5940250276	departments	1733c901-4856-419f-895f-927e30f3f4ac	create	\N	{"id": "1733c901-4856-419f-895f-927e30f3f4ac", "code": "HR", "name": "Human Resources", "level": 1, "is_active": null, "parent_id": null, "created_at": "2026-03-31T18:13:37.294149+05:30", "updated_at": "2026-03-31T18:13:37.294149+05:30", "description": "Desc", "head_user_id": null}	\N	2026-03-31 18:13:37.28596+05:30	\N
38960cbe-9a71-405a-b4fb-315a275fb75d	departments	be2aa915-d90a-44ff-9815-d35238746c12	update	{"id": "be2aa915-d90a-44ff-9815-d35238746c12", "code": null, "name": "Engineering", "level": 1, "is_active": null, "parent_id": null, "created_at": "2026-03-23T11:47:54.256303+05:30", "updated_at": "2026-03-23T11:47:54.256303+05:30", "description": null, "head_user_id": null}	{"id": "be2aa915-d90a-44ff-9815-d35238746c12", "code": "ENG", "name": "Engineering", "level": 1, "is_active": null, "parent_id": null, "created_at": "2026-03-23T11:47:54.256303+05:30", "updated_at": "2026-03-31T18:13:48.248733+05:30", "description": null, "head_user_id": null}	\N	2026-03-31 18:13:48.25343+05:30	\N
b08a3fb7-6dd6-48d4-9592-b0a2802975a4	departments	f86e151f-67e2-4e4d-8a9f-49eff88c96ec	create	\N	{"id": "f86e151f-67e2-4e4d-8a9f-49eff88c96ec", "code": "REC", "name": "Recruitment", "level": 2, "is_active": null, "parent_id": "1733c901-4856-419f-895f-927e30f3f4ac", "created_at": "2026-03-31T18:14:47.401731+05:30", "updated_at": "2026-03-31T18:14:47.401731+05:30", "description": "Desc", "head_user_id": null}	\N	2026-03-31 18:14:47.401145+05:30	\N
026ec61f-8b87-4911-bfc2-615bcd79a870	departments	be2aa915-d90a-44ff-9815-d35238746c12	update	{"id": "be2aa915-d90a-44ff-9815-d35238746c12", "code": "ENG", "name": "Engineering", "level": 1, "is_active": null, "parent_id": null, "created_at": "2026-03-23T11:47:54.256303+05:30", "updated_at": "2026-03-31T18:13:48.248733+05:30", "description": null, "head_user_id": null}	{"id": "be2aa915-d90a-44ff-9815-d35238746c12", "code": "ENG", "name": "Engineering", "level": 1, "is_active": null, "parent_id": null, "created_at": "2026-03-23T11:47:54.256303+05:30", "updated_at": "2026-03-31T18:14:57.027145+05:30", "description": null, "head_user_id": "82b57d97-ff21-4121-a794-352e627c95c4"}	\N	2026-03-31 18:14:57.027764+05:30	\N
14b1a2c3-d1ef-4f00-ad31-9cc5a5cdfbbc	departments	5a83a62a-8353-4776-8c4c-77f489e4035e	create	\N	{"id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "code": "ENG", "name": "Information Technology", "level": 2, "is_active": null, "parent_id": "be2aa915-d90a-44ff-9815-d35238746c12", "created_at": "2026-03-31T18:15:35.89138+05:30", "updated_at": "2026-03-31T18:15:35.89138+05:30", "description": "Desc", "head_user_id": "82b57d97-ff21-4121-a794-352e627c95c4"}	\N	2026-03-31 18:15:35.890833+05:30	\N
26bfeeb9-c0aa-4fc3-81f0-8314950a6158	designations	bcf69dc3-3407-404f-bd52-a3c88dde26b6	create	\N	{"id": "bcf69dc3-3407-404f-bd52-a3c88dde26b6", "code": "JDE", "name": "Junior Software Developer", "is_active": null, "band_level": "L1", "created_at": "2026-03-31T18:19:54.973361+05:30", "created_by": null, "updated_at": "2026-03-31T18:19:54.973361+05:30", "description": "Desc", "department_id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "hierarchy_level": 1, "is_department_head": false}	\N	2026-03-31 18:19:54.972087+05:30	\N
11124b9b-4514-4037-a33f-fbe9fe84abf7	designations	32c9aaaa-64f4-4ad9-91c2-db7b06312c4b	create	\N	{"id": "32c9aaaa-64f4-4ad9-91c2-db7b06312c4b", "code": "SSE", "name": "Senior Software Engineer", "is_active": null, "band_level": "Executive", "created_at": "2026-03-31T18:20:31.041851+05:30", "created_by": null, "updated_at": "2026-03-31T18:20:31.041851+05:30", "description": "Desc", "department_id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "hierarchy_level": 1, "is_department_head": false}	\N	2026-03-31 18:20:31.041303+05:30	\N
714fdfd4-efec-415a-ba24-e6a9a7cb22bd	designations	32c9aaaa-64f4-4ad9-91c2-db7b06312c4b	update	{"id": "32c9aaaa-64f4-4ad9-91c2-db7b06312c4b", "code": "SSE", "name": "Senior Software Engineer", "is_active": null, "band_level": "Executive", "created_at": "2026-03-31T18:20:31.041851+05:30", "created_by": null, "updated_at": "2026-03-31T18:20:31.041851+05:30", "description": "Desc", "department_id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "hierarchy_level": 1, "is_department_head": false}	{"id": "32c9aaaa-64f4-4ad9-91c2-db7b06312c4b", "code": "SSE", "name": "Senior Software Engineer", "is_active": null, "band_level": "Executive", "created_at": "2026-03-31T18:20:31.041851+05:30", "created_by": null, "updated_at": "2026-03-31T18:25:47.387017+05:30", "description": "Desc", "department_id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "hierarchy_level": 1, "is_department_head": true}	\N	2026-03-31 18:25:47.392912+05:30	\N
89497db9-46fa-4ddb-a732-40c190e93c03	designations	bcf69dc3-3407-404f-bd52-a3c88dde26b6	update	{"id": "bcf69dc3-3407-404f-bd52-a3c88dde26b6", "code": "JDE", "name": "Junior Software Developer", "is_active": null, "band_level": "L1", "created_at": "2026-03-31T18:19:54.973361+05:30", "created_by": null, "updated_at": "2026-03-31T18:19:54.973361+05:30", "description": "Desc", "department_id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "hierarchy_level": 1, "is_department_head": false}	{"id": "bcf69dc3-3407-404f-bd52-a3c88dde26b6", "code": "JDE", "name": "Junior Software Developer", "is_active": true, "band_level": "L1", "created_at": "2026-03-31T18:19:54.973361+05:30", "created_by": null, "updated_at": "2026-03-31T18:19:54.973361+05:30", "description": "Desc", "department_id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "hierarchy_level": 1, "is_department_head": false}	\N	2026-03-31 18:35:59.136775+05:30	\N
5c645b48-7afd-4a16-9e19-c15705ef387f	designations	32c9aaaa-64f4-4ad9-91c2-db7b06312c4b	update	{"id": "32c9aaaa-64f4-4ad9-91c2-db7b06312c4b", "code": "SSE", "name": "Senior Software Engineer", "is_active": null, "band_level": "Executive", "created_at": "2026-03-31T18:20:31.041851+05:30", "created_by": null, "updated_at": "2026-03-31T18:25:47.387017+05:30", "description": "Desc", "department_id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "hierarchy_level": 1, "is_department_head": true}	{"id": "32c9aaaa-64f4-4ad9-91c2-db7b06312c4b", "code": "SSE", "name": "Senior Software Engineer", "is_active": true, "band_level": "Executive", "created_at": "2026-03-31T18:20:31.041851+05:30", "created_by": null, "updated_at": "2026-03-31T18:25:47.387017+05:30", "description": "Desc", "department_id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "hierarchy_level": 1, "is_department_head": true}	\N	2026-03-31 18:35:59.136775+05:30	\N
97e531c5-9eea-4ca6-ac9a-6e6be6b85c9d	departments	1733c901-4856-419f-895f-927e30f3f4ac	update	{"id": "1733c901-4856-419f-895f-927e30f3f4ac", "code": "HR", "name": "Human Resources", "level": 1, "is_active": null, "parent_id": null, "created_at": "2026-03-31T18:13:37.294149+05:30", "updated_at": "2026-03-31T18:13:37.294149+05:30", "description": "Desc", "head_user_id": null}	{"id": "1733c901-4856-419f-895f-927e30f3f4ac", "code": "HR", "name": "Human Resources", "level": 1, "is_active": true, "parent_id": null, "created_at": "2026-03-31T18:13:37.294149+05:30", "updated_at": "2026-03-31T18:13:37.294149+05:30", "description": "Desc", "head_user_id": null}	\N	2026-03-31 18:36:57.11858+05:30	\N
92dd23d8-2e91-4cd8-bc1d-807a2f6b4a3c	departments	f86e151f-67e2-4e4d-8a9f-49eff88c96ec	update	{"id": "f86e151f-67e2-4e4d-8a9f-49eff88c96ec", "code": "REC", "name": "Recruitment", "level": 2, "is_active": null, "parent_id": "1733c901-4856-419f-895f-927e30f3f4ac", "created_at": "2026-03-31T18:14:47.401731+05:30", "updated_at": "2026-03-31T18:14:47.401731+05:30", "description": "Desc", "head_user_id": null}	{"id": "f86e151f-67e2-4e4d-8a9f-49eff88c96ec", "code": "REC", "name": "Recruitment", "level": 2, "is_active": true, "parent_id": "1733c901-4856-419f-895f-927e30f3f4ac", "created_at": "2026-03-31T18:14:47.401731+05:30", "updated_at": "2026-03-31T18:14:47.401731+05:30", "description": "Desc", "head_user_id": null}	\N	2026-03-31 18:36:57.11858+05:30	\N
a46594c7-a594-4443-a093-60edae2a419d	departments	be2aa915-d90a-44ff-9815-d35238746c12	update	{"id": "be2aa915-d90a-44ff-9815-d35238746c12", "code": "ENG", "name": "Engineering", "level": 1, "is_active": null, "parent_id": null, "created_at": "2026-03-23T11:47:54.256303+05:30", "updated_at": "2026-03-31T18:14:57.027145+05:30", "description": null, "head_user_id": "82b57d97-ff21-4121-a794-352e627c95c4"}	{"id": "be2aa915-d90a-44ff-9815-d35238746c12", "code": "ENG", "name": "Engineering", "level": 1, "is_active": true, "parent_id": null, "created_at": "2026-03-23T11:47:54.256303+05:30", "updated_at": "2026-03-31T18:14:57.027145+05:30", "description": null, "head_user_id": "82b57d97-ff21-4121-a794-352e627c95c4"}	\N	2026-03-31 18:36:57.11858+05:30	\N
b20a6a4f-a7ea-4c9c-9000-8ce8e5402426	departments	5a83a62a-8353-4776-8c4c-77f489e4035e	update	{"id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "code": "ENG", "name": "Information Technology", "level": 2, "is_active": null, "parent_id": "be2aa915-d90a-44ff-9815-d35238746c12", "created_at": "2026-03-31T18:15:35.89138+05:30", "updated_at": "2026-03-31T18:15:35.89138+05:30", "description": "Desc", "head_user_id": "82b57d97-ff21-4121-a794-352e627c95c4"}	{"id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "code": "ENG", "name": "Information Technology", "level": 2, "is_active": true, "parent_id": "be2aa915-d90a-44ff-9815-d35238746c12", "created_at": "2026-03-31T18:15:35.89138+05:30", "updated_at": "2026-03-31T18:15:35.89138+05:30", "description": "Desc", "head_user_id": "82b57d97-ff21-4121-a794-352e627c95c4"}	\N	2026-03-31 18:36:57.11858+05:30	\N
0d547ae1-db61-480c-81ed-0c77ebea0810	employee_assignments	b7a02457-c085-4131-b4d9-206bb3c9c145	create	\N	{"id": "b7a02457-c085-4131-b4d9-206bb3c9c145", "user_id": "6bd17ff7-6568-4789-bd7e-0b9b057eb5fe", "is_active": true, "created_at": "2026-03-31T18:44:01.572917+05:30", "created_by": null, "is_primary": true, "updated_at": "2026-03-31T18:44:01.572917+05:30", "department_id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "reports_to_id": "50e5aa4e-e0bb-471d-9ce5-69a33aae63d2", "designation_id": "bcf69dc3-3407-404f-bd52-a3c88dde26b6", "effective_from": null, "effective_until": null}	\N	2026-03-31 18:44:01.562421+05:30	\N
80fed2c2-1440-4d25-b9f9-47f13f3b108e	employee_assignments	8710f2c4-0fdb-4bb5-8eb3-df6885ec8094	create	\N	{"id": "8710f2c4-0fdb-4bb5-8eb3-df6885ec8094", "user_id": "56821a90-157d-4626-acfc-eccf24c074b8", "is_active": true, "created_at": "2026-03-31T18:44:23.182811+05:30", "created_by": null, "is_primary": true, "updated_at": "2026-03-31T18:44:23.182811+05:30", "department_id": "5a83a62a-8353-4776-8c4c-77f489e4035e", "reports_to_id": "82b57d97-ff21-4121-a794-352e627c95c4", "designation_id": "32c9aaaa-64f4-4ad9-91c2-db7b06312c4b", "effective_from": null, "effective_until": null}	\N	2026-03-31 18:44:23.181596+05:30	\N
7c944e7e-f905-4dda-868a-a3abda828f5b	employee_assignments	87113f0e-9600-4a98-874f-5956e59eafab	create	\N	{"id": "87113f0e-9600-4a98-874f-5956e59eafab", "user_id": "360cb5f1-42a4-4a8c-b16c-988069b90fed", "is_active": true, "created_at": "2026-03-31T18:47:37.486843+05:30", "created_by": null, "is_primary": true, "updated_at": "2026-03-31T18:47:37.486843+05:30", "department_id": "be2aa915-d90a-44ff-9815-d35238746c12", "reports_to_id": null, "designation_id": "bcf69dc3-3407-404f-bd52-a3c88dde26b6", "effective_from": null, "effective_until": null}	\N	2026-03-31 18:47:37.485964+05:30	\N
5419ab59-b9d6-437e-9f72-95b15d6abf3e	departments	1733c901-4856-419f-895f-927e30f3f4ac	update	{"id": "1733c901-4856-419f-895f-927e30f3f4ac", "code": "HR", "name": "Human Resources", "level": 1, "is_active": true, "parent_id": null, "created_at": "2026-03-31T18:13:37.294149+05:30", "updated_at": "2026-03-31T18:13:37.294149+05:30", "description": "Desc", "head_user_id": null}	{"id": "1733c901-4856-419f-895f-927e30f3f4ac", "code": "HR", "name": "Human Resources", "level": 1, "is_active": true, "parent_id": null, "created_at": "2026-03-31T18:13:37.294149+05:30", "updated_at": "2026-03-31T19:40:44.911781+05:30", "description": "Desc", "head_user_id": "50e5aa4e-e0bb-471d-9ce5-69a33aae63d2"}	\N	2026-03-31 19:40:44.917416+05:30	\N
\.


--
-- TOC entry 5793 (class 0 OID 49606)
-- Dependencies: 332
-- Data for Name: organizational_roles; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.organizational_roles (id, name, description, level_order, created_at, created_by, job_family_id, department_id, updated_at) FROM stdin;
\.


--
-- TOC entry 5794 (class 0 OID 49614)
-- Dependencies: 333
-- Data for Name: page_sections; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.page_sections (id, page_id, template_id, section_type, title, content, styling, order_index, is_visible, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5795 (class 0 OID 49626)
-- Dependencies: 334
-- Data for Name: path_adaptations; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.path_adaptations (id, personalized_path_id, adaptation_type, trigger_reason, old_value, new_value, applied_at, reverted_at) FROM stdin;
\.


--
-- TOC entry 5796 (class 0 OID 49633)
-- Dependencies: 335
-- Data for Name: personalized_paths; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.personalized_paths (id, user_id, base_learning_path_id, title, description, target_competency_id, current_phase, customizations, progress_percentage, started_at, completed_at, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5797 (class 0 OID 49645)
-- Dependencies: 336
-- Data for Name: point_rules; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.point_rules (id, name, description, trigger_event, base_points, difficulty_multiplier, competency_multiplier, priority_multiplier, is_active, conditions, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5798 (class 0 OID 49659)
-- Dependencies: 337
-- Data for Name: point_transactions; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.point_transactions (id, user_id, rule_id, trigger_event, points_earned, multiplier_applied, reference_type, reference_id, description, created_at) FROM stdin;
\.


--
-- TOC entry 5799 (class 0 OID 49667)
-- Dependencies: 338
-- Data for Name: poll_questions; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.poll_questions (id, poll_id, question_text, question_type, options, order_index, created_at) FROM stdin;
\.


--
-- TOC entry 5800 (class 0 OID 49678)
-- Dependencies: 339
-- Data for Name: poll_responses; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.poll_responses (id, session_id, question_id, user_id, selected_options, text_response, submitted_at) FROM stdin;
\.


--
-- TOC entry 5801 (class 0 OID 49686)
-- Dependencies: 340
-- Data for Name: poll_results_cache; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.poll_results_cache (id, session_id, question_id, option_counts, total_responses, updated_at) FROM stdin;
\.


--
-- TOC entry 5802 (class 0 OID 49695)
-- Dependencies: 341
-- Data for Name: poll_sessions; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.poll_sessions (id, poll_id, batch_id, course_id, started_by, status, time_limit_seconds, started_at, ended_at, current_question_index) FROM stdin;
\.


--
-- TOC entry 5803 (class 0 OID 49705)
-- Dependencies: 342
-- Data for Name: poll_templates; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.poll_templates (id, title, description, is_anonymous, show_live_results, allow_multiple_votes, is_active, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5804 (class 0 OID 49717)
-- Dependencies: 343
-- Data for Name: proficiency_scale_levels; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.proficiency_scale_levels (id, scale_id, level, name, description, behavioral_indicators, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5805 (class 0 OID 49724)
-- Dependencies: 344
-- Data for Name: proficiency_scales; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.proficiency_scales (id, name, description, min_level, max_level, is_default, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5806 (class 0 OID 49735)
-- Dependencies: 345
-- Data for Name: profiles; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.profiles (id, email, full_name, avatar_url, department_id, created_at, updated_at, employee_id, designation, is_manager, organizational_role_id) FROM stdin;
50e5aa4e-e0bb-471d-9ce5-69a33aae63d2	trainer1@gmail.com	Trainer1	\N	\N	2026-03-25 18:37:05.780791+05:30	2026-03-27 18:30:04.572039+05:30	tr1	tr1	f	\N
82b57d97-ff21-4121-a794-352e627c95c4	mallik.jumpstart@gmail.com	Mallik Kumar	\N	\N	2026-03-25 18:18:11.353683+05:30	2026-03-30 13:05:49.379405+05:30	admin1	admin1	f	\N
a1cf1f9c-e141-41cc-84e2-c86c2ffba28b	trainer2@gmail.com	Trainer2	\N	\N	2026-03-31 13:43:37.570834+05:30	2026-03-31 13:43:37.620673+05:30	tr2	tr2	f	\N
6bd17ff7-6568-4789-bd7e-0b9b057eb5fe	student1@gmail.com	Student1	\N	be2aa915-d90a-44ff-9815-d35238746c12	2026-03-25 18:45:09.662368+05:30	2026-03-31 19:01:36.36518+05:30	st2	st2	f	\N
56821a90-157d-4626-acfc-eccf24c074b8	student2@gmail.com	Student2	\N	be2aa915-d90a-44ff-9815-d35238746c12	2026-03-26 12:52:46.910296+05:30	2026-03-31 19:01:36.36518+05:30	st1	st1	f	\N
360cb5f1-42a4-4a8c-b16c-988069b90fed	student3@gmail.com	Student3	\N	be2aa915-d90a-44ff-9815-d35238746c12	2026-03-26 12:53:56.077613+05:30	2026-03-31 19:01:36.36518+05:30	st3	st3	f	\N
2dbf29ad-bb2d-4ff7-ba7a-6cb61d325b47	student5@gmail.com	Student5	\N	1733c901-4856-419f-895f-927e30f3f4ac	2026-03-30 13:06:44.816399+05:30	2026-03-31 19:01:36.36518+05:30	st5	st5	f	\N
d9e49dae-080b-41e7-9bed-e33634463f3e	student4@gmail.com	Student4	\N	1733c901-4856-419f-895f-927e30f3f4ac	2026-03-26 12:56:50.607742+05:30	2026-03-31 19:01:36.36518+05:30	st4	st4	f	\N
\.


--
-- TOC entry 5807 (class 0 OID 49743)
-- Dependencies: 346
-- Data for Name: question_analytics; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.question_analytics (id, question_id, question_source, assessment_id, total_attempts, correct_attempts, avg_time_seconds, discrimination_index, updated_at) FROM stdin;
\.


--
-- TOC entry 5808 (class 0 OID 49754)
-- Dependencies: 347
-- Data for Name: question_bank; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.question_bank (id, question_text, question_type, options, correct_answer, explanation, points, difficulty, tags, competency_id, media_url, media_type, is_active, usage_count, created_by, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5809 (class 0 OID 49770)
-- Dependencies: 348
-- Data for Name: role_permissions; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.role_permissions (id, designation_id, permission_key, can_view, can_create, can_edit, can_delete, created_at, updated_at) FROM stdin;
b9b3d613-87db-4d4d-8683-5998c2388004	bcf69dc3-3407-404f-bd52-a3c88dde26b6	learners	t	f	f	f	2026-03-31 18:25:32.181088+05:30	2026-03-31 18:25:32.181088+05:30
2f1e6b4e-bd49-4f17-a6ef-e1756305a0e9	32c9aaaa-64f4-4ad9-91c2-db7b06312c4b	learners	t	t	t	t	2026-03-31 18:25:40.478907+05:30	2026-03-31 18:25:40.478907+05:30
\.


--
-- TOC entry 5810 (class 0 OID 49781)
-- Dependencies: 349
-- Data for Name: scheduled_reassessments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.scheduled_reassessments (id, learner_id, competency_id, assessment_id, scheduled_date, reminder_sent, status, created_at) FROM stdin;
\.


--
-- TOC entry 5811 (class 0 OID 49790)
-- Dependencies: 350
-- Data for Name: score_level_mappings; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.score_level_mappings (id, proficiency_scale_id, level_number, level_name, min_score, max_score, description, color, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5812 (class 0 OID 49802)
-- Dependencies: 351
-- Data for Name: section_templates; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.section_templates (id, name, type, description, icon, default_config, schema, is_active, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5813 (class 0 OID 49812)
-- Dependencies: 352
-- Data for Name: session_interactions; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.session_interactions (id, session_id, user_id, interaction_type, content, parent_id, is_anonymous, created_at) FROM stdin;
\.


--
-- TOC entry 5814 (class 0 OID 49820)
-- Dependencies: 353
-- Data for Name: session_reminders; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.session_reminders (id, schedule_id, user_id, reminder_type, remind_before_minutes, sent_at, is_sent, created_at) FROM stdin;
\.


--
-- TOC entry 5815 (class 0 OID 49830)
-- Dependencies: 354
-- Data for Name: skill_mapping_suggestions; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.skill_mapping_suggestions (id, course_id, competency_id, suggested_level, confidence_score, reasoning, status, reviewed_by, reviewed_at, created_at) FROM stdin;
\.


--
-- TOC entry 5816 (class 0 OID 49840)
-- Dependencies: 355
-- Data for Name: streak_tracker; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.streak_tracker (id, user_id, current_streak, longest_streak, last_activity_date, streak_start_date, updated_at) FROM stdin;
c461f432-a993-408d-836d-c5d3748933b5	82b57d97-ff21-4121-a794-352e627c95c4	6	6	2026-04-01	2026-03-25	\N
70a81df6-3f15-4e5c-ad02-cdd94c84fdf2	a1cf1f9c-e141-41cc-84e2-c86c2ffba28b	1	1	2026-04-01	2026-04-01	\N
c367b120-b5af-4376-8582-5d2964ae51e4	50e5aa4e-e0bb-471d-9ce5-69a33aae63d2	1	1	2026-04-01	2026-04-01	\N
b53b208b-3696-4420-9e50-2fa5ed92753b	6bd17ff7-6568-4789-bd7e-0b9b057eb5fe	5	5	2026-04-01	2026-03-26	\N
71d5d441-162d-49b4-b218-84a8c52463fb	2dbf29ad-bb2d-4ff7-ba7a-6cb61d325b47	3	3	2026-04-01	2026-03-31	\N
85a65d36-1acb-427f-a033-0bca60c87dcd	56821a90-157d-4626-acfc-eccf24c074b8	8	8	2026-04-01	2026-03-31	\N
ee876155-1830-4a44-b458-c7e31b11a76c	360cb5f1-42a4-4a8c-b16c-988069b90fed	9	9	2026-04-01	2026-03-31	\N
5fed86e6-ebe8-4583-9d19-6395642b8d65	d9e49dae-080b-41e7-9bed-e33634463f3e	21	21	2026-04-01	2026-03-31	\N
\.


--
-- TOC entry 5817 (class 0 OID 49847)
-- Dependencies: 356
-- Data for Name: tag_taxonomy; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.tag_taxonomy (id, name, category, parent_id, description, is_active, created_at) FROM stdin;
\.


--
-- TOC entry 5818 (class 0 OID 49855)
-- Dependencies: 357
-- Data for Name: trainer_feedback_responses; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.trainer_feedback_responses (id, survey_id, learner_id, rating, feedback_text, submitted_at) FROM stdin;
\.


--
-- TOC entry 5819 (class 0 OID 49863)
-- Dependencies: 358
-- Data for Name: trainer_feedback_surveys; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.trainer_feedback_surveys (id, trainer_id, title, description, template_id, initiated_by, batch_id, course_id, status, start_date, end_date, is_anonymous, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5820 (class 0 OID 49875)
-- Dependencies: 359
-- Data for Name: trainer_ratings; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.trainer_ratings (id, trainer_id, average_rating, total_reviews, outstanding_count, good_count, average_count, bad_count, miserable_count, last_updated_at) FROM stdin;
\.


--
-- TOC entry 5821 (class 0 OID 49887)
-- Dependencies: 360
-- Data for Name: trainers; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.trainers (id, user_id, name, title, bio, avatar_url, is_external, company_name, email, created_at, updated_at) FROM stdin;
9b954509-beba-477c-98f0-e207e5fb6a25	\N	ExTrainer1	Consultant	Bio	\N	t	FSF	extrain1@gmail.com	2026-03-25 18:40:47.475973+05:30	2026-03-25 18:40:47.475973+05:30
6531bd2e-6d62-464c-a055-a5d8141be184	\N	ExTrain2	ET2	Bio	\N	t	FSF	et2@gmail.com	2026-03-26 15:06:11.906661+05:30	2026-03-26 15:06:11.906661+05:30
\.


--
-- TOC entry 5822 (class 0 OID 49896)
-- Dependencies: 361
-- Data for Name: user_competencies; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.user_competencies (id, user_id, competency_id, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5823 (class 0 OID 49901)
-- Dependencies: 362
-- Data for Name: user_consent_records; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.user_consent_records (id, user_id, consent_type, consent_given, consent_version, given_at, withdrawn_at, ip_address, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5824 (class 0 OID 49910)
-- Dependencies: 363
-- Data for Name: user_dashboard_layouts; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.user_dashboard_layouts (id, user_id, layout, theme_preferences, updated_at, created_at, template_id) FROM stdin;
\.


--
-- TOC entry 5825 (class 0 OID 49920)
-- Dependencies: 364
-- Data for Name: user_departments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.user_departments (id, user_id, department_id, created_at) FROM stdin;
628ea2c0-f4d5-447d-ab84-bf8678c1a3ab	2dbf29ad-bb2d-4ff7-ba7a-6cb61d325b47	f86e151f-67e2-4e4d-8a9f-49eff88c96ec	\N
ea773d9d-2899-41e3-b557-5c83e6963bc3	d9e49dae-080b-41e7-9bed-e33634463f3e	1733c901-4856-419f-895f-927e30f3f4ac	\N
\.


--
-- TOC entry 5826 (class 0 OID 49925)
-- Dependencies: 365
-- Data for Name: user_managers; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.user_managers (id, manager_id, subordinate_id, created_at, updated_at) FROM stdin;
ac121bd3-4e94-472e-aef1-8e32a09953f5	82b57d97-ff21-4121-a794-352e627c95c4	d9e49dae-080b-41e7-9bed-e33634463f3e	2026-03-31 18:58:42.220961+05:30	2026-03-31 18:58:42.220961+05:30
\.


--
-- TOC entry 5827 (class 0 OID 49931)
-- Dependencies: 366
-- Data for Name: user_mfa_settings; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.user_mfa_settings (id, user_id, mfa_enabled, mfa_method, enrolled_at, last_verified_at, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5828 (class 0 OID 49941)
-- Dependencies: 367
-- Data for Name: user_roles; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.user_roles (id, user_id, role, department_id, created_at, updated_at) FROM stdin;
3f465e74-dcc3-4d15-bf9c-3b8d7d12a9e1	82b57d97-ff21-4121-a794-352e627c95c4	admin	\N	2026-03-25 18:18:11.366713+05:30	2026-03-25 18:18:11.366713+05:30
b0a56de5-dea7-46c6-a0b8-b9c258a29296	50e5aa4e-e0bb-471d-9ce5-69a33aae63d2	trainer	\N	2026-03-25 18:37:25.908761+05:30	2026-03-25 18:37:25.908761+05:30
8ccc5880-c064-48fb-936b-08167d33c91e	6bd17ff7-6568-4789-bd7e-0b9b057eb5fe	learner	\N	2026-03-25 18:45:09.663888+05:30	2026-03-25 18:45:09.663888+05:30
5162ea17-66c9-488b-b084-4b7a84f69f7a	56821a90-157d-4626-acfc-eccf24c074b8	learner	\N	2026-03-26 12:52:46.917974+05:30	2026-03-26 12:52:46.917974+05:30
d9b57f56-50c7-41e1-bbab-8e3546eefc44	360cb5f1-42a4-4a8c-b16c-988069b90fed	learner	\N	2026-03-26 12:53:56.079516+05:30	2026-03-26 12:53:56.079516+05:30
454390c4-f203-4f75-9d0f-218e15a9f877	d9e49dae-080b-41e7-9bed-e33634463f3e	learner	\N	2026-03-26 12:56:50.609742+05:30	2026-03-26 12:56:50.609742+05:30
8e207812-55d9-4d90-95e0-364ef654279b	82b57d97-ff21-4121-a794-352e627c95c4	department_head	\N	2026-03-30 13:04:44.127285+05:30	2026-03-30 13:04:44.127285+05:30
04058857-2427-49eb-a6ab-c3580cc2f74b	2dbf29ad-bb2d-4ff7-ba7a-6cb61d325b47	learner	\N	2026-03-30 13:06:44.819555+05:30	2026-03-30 13:06:44.819555+05:30
ebd27b68-6bba-45ab-9976-f87204b88c71	a1cf1f9c-e141-41cc-84e2-c86c2ffba28b	trainer	\N	2026-03-31 13:44:06.732228+05:30	2026-03-31 13:44:06.732228+05:30
8b6b5836-6b7f-4ab2-9c1c-518d56862d08	82b57d97-ff21-4121-a794-352e627c95c4	mentor	\N	2026-03-31 13:59:04.412484+05:30	2026-03-31 13:59:04.412484+05:30
\.


--
-- TOC entry 5829 (class 0 OID 49947)
-- Dependencies: 368
-- Data for Name: user_type_ui_config; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.user_type_ui_config (id, user_type, config, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5681 (class 0 OID 48447)
-- Dependencies: 220
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.users (id, email, created_at, password) FROM stdin;
82b57d97-ff21-4121-a794-352e627c95c4	mallik.jumpstart@gmail.com	\N	$2a$10$8Ti57PHQ/4i6.pFUJxkVmOOs2sO6AuYPK0QVj0BukYJZDD88.zaii
50e5aa4e-e0bb-471d-9ce5-69a33aae63d2	trainer1@gmail.com	\N	$2a$10$XIuBMxqsrclwG9wGQaEd1uh1NDHfCCE0bjDn6dDNb0LpJL5HVZLre
6bd17ff7-6568-4789-bd7e-0b9b057eb5fe	student1@gmail.com	\N	$2a$10$Y0KJe7H7Ammtg2WXvFd4.ut1.hl6oyoEjhxleOP8PNbkfiqoDsLB2
56821a90-157d-4626-acfc-eccf24c074b8	student2@gmail.com	\N	$2a$10$nPvNxn5mMuMRmRCk70v/fuaj410ZpCKarp22ZNv/1KrhJpqCGfuSu
360cb5f1-42a4-4a8c-b16c-988069b90fed	student3@gmail.com	\N	$2a$10$litVfoxb8tCQ5Ky7/dH1V.BwrSngXDcDQE/JqIajbHX/jqPzPWYBu
d9e49dae-080b-41e7-9bed-e33634463f3e	student4@gmail.com	\N	$2a$10$dl2CbFLS3oAIEgOxmBeC..wr69eGTZzRFoOGSUxz6n2V79RrS.XWi
2dbf29ad-bb2d-4ff7-ba7a-6cb61d325b47	student5@gmail.com	\N	$2a$10$mV6Rp9UD2DSj1LpRtrVmw.axp1IRmx///tU7bErIsC9XPUF.7ux2S
a1cf1f9c-e141-41cc-84e2-c86c2ffba28b	trainer2@gmail.com	\N	$2a$10$Qyu1awz8VjiXZ.hpN5Wg0enwdto3ibzsQxVrz0Q6uLegIWoEFtb5S
\.


--
-- TOC entry 5830 (class 0 OID 49956)
-- Dependencies: 369
-- Data for Name: xapi_statements; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.xapi_statements (id, statement_id, actor_id, verb, object_type, object_id, object_name, result_score, result_success, result_completion, result_duration, context_data, "timestamp", synced_to_lrs, synced_at) FROM stdin;
\.


--
-- TOC entry 4725 (class 2606 OID 51671)
-- Name: account_deletion_requests account_deletion_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.account_deletion_requests
    ADD CONSTRAINT account_deletion_requests_pkey PRIMARY KEY (id);


--
-- TOC entry 4728 (class 2606 OID 51696)
-- Name: ai_content_tags ai_content_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.ai_content_tags
    ADD CONSTRAINT ai_content_tags_pkey PRIMARY KEY (id);


--
-- TOC entry 4730 (class 2606 OID 51724)
-- Name: ai_learning_recommendations ai_learning_recommendations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.ai_learning_recommendations
    ADD CONSTRAINT ai_learning_recommendations_pkey PRIMARY KEY (id);


--
-- TOC entry 4732 (class 2606 OID 51772)
-- Name: assessment_assignment_learners assessment_assignment_learners_assignment_id_learner_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_assignment_learners
    ADD CONSTRAINT assessment_assignment_learners_assignment_id_learner_id_key UNIQUE (assignment_id, learner_id);


--
-- TOC entry 4734 (class 2606 OID 51759)
-- Name: assessment_assignment_learners assessment_assignment_learners_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_assignment_learners
    ADD CONSTRAINT assessment_assignment_learners_pkey PRIMARY KEY (id);


--
-- TOC entry 4738 (class 2606 OID 49977)
-- Name: assessment_assignments assessment_assignments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_assignments
    ADD CONSTRAINT assessment_assignments_pkey PRIMARY KEY (id);


--
-- TOC entry 4741 (class 2606 OID 51797)
-- Name: assessment_calibration assessment_calibration_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_calibration
    ADD CONSTRAINT assessment_calibration_pkey PRIMARY KEY (id);


--
-- TOC entry 4743 (class 2606 OID 51817)
-- Name: assessment_question_links assessment_question_links_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_question_links
    ADD CONSTRAINT assessment_question_links_pkey PRIMARY KEY (id);


--
-- TOC entry 4746 (class 2606 OID 51839)
-- Name: assignment_group_members assignment_group_members_group_id_learner_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_group_members
    ADD CONSTRAINT assignment_group_members_group_id_learner_id_key UNIQUE (group_id, learner_id);


--
-- TOC entry 4748 (class 2606 OID 51828)
-- Name: assignment_group_members assignment_group_members_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_group_members
    ADD CONSTRAINT assignment_group_members_pkey PRIMARY KEY (id);


--
-- TOC entry 4750 (class 2606 OID 49987)
-- Name: assignment_groups assignment_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_groups
    ADD CONSTRAINT assignment_groups_pkey PRIMARY KEY (id);


--
-- TOC entry 4752 (class 2606 OID 51876)
-- Name: assignment_learners assignment_learners_assignment_id_learner_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_learners
    ADD CONSTRAINT assignment_learners_assignment_id_learner_id_key UNIQUE (assignment_id, learner_id);


--
-- TOC entry 4754 (class 2606 OID 51858)
-- Name: assignment_learners assignment_learners_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_learners
    ADD CONSTRAINT assignment_learners_pkey PRIMARY KEY (id);


--
-- TOC entry 4756 (class 2606 OID 51886)
-- Name: assignment_submission_history assignment_submission_history_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_submission_history
    ADD CONSTRAINT assignment_submission_history_pkey PRIMARY KEY (id);


--
-- TOC entry 4758 (class 2606 OID 49995)
-- Name: assignment_submissions assignment_submissions_assignment_id_student_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_submissions
    ADD CONSTRAINT assignment_submissions_assignment_id_student_id_key UNIQUE (assignment_id, student_id);


--
-- TOC entry 4760 (class 2606 OID 49997)
-- Name: assignment_submissions assignment_submissions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_submissions
    ADD CONSTRAINT assignment_submissions_pkey PRIMARY KEY (id);


--
-- TOC entry 4763 (class 2606 OID 49999)
-- Name: assignments assignments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignments
    ADD CONSTRAINT assignments_pkey PRIMARY KEY (id);


--
-- TOC entry 4765 (class 2606 OID 51929)
-- Name: attendance attendance_batch_id_student_id_session_date_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.attendance
    ADD CONSTRAINT attendance_batch_id_student_id_session_date_key UNIQUE (batch_id, student_id, session_date);


--
-- TOC entry 4767 (class 2606 OID 51918)
-- Name: attendance attendance_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.attendance
    ADD CONSTRAINT attendance_pkey PRIMARY KEY (id);


--
-- TOC entry 4769 (class 2606 OID 51941)
-- Name: audit_logs audit_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.audit_logs
    ADD CONSTRAINT audit_logs_pkey PRIMARY KEY (id);


--
-- TOC entry 4774 (class 2606 OID 51990)
-- Name: auto_assignment_rules auto_assignment_rules_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.auto_assignment_rules
    ADD CONSTRAINT auto_assignment_rules_pkey PRIMARY KEY (id);


--
-- TOC entry 4776 (class 2606 OID 50009)
-- Name: badge_definitions badge_definitions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.badge_definitions
    ADD CONSTRAINT badge_definitions_pkey PRIMARY KEY (id);


--
-- TOC entry 4778 (class 2606 OID 50011)
-- Name: batch_assignments batch_assignments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_assignments
    ADD CONSTRAINT batch_assignments_pkey PRIMARY KEY (id);


--
-- TOC entry 4780 (class 2606 OID 52049)
-- Name: batch_lesson_plans batch_lesson_plans_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_lesson_plans
    ADD CONSTRAINT batch_lesson_plans_pkey PRIMARY KEY (id);


--
-- TOC entry 4782 (class 2606 OID 52082)
-- Name: batch_mentors batch_mentors_batch_id_mentor_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_mentors
    ADD CONSTRAINT batch_mentors_batch_id_mentor_id_key UNIQUE (batch_id, mentor_id);


--
-- TOC entry 4784 (class 2606 OID 52064)
-- Name: batch_mentors batch_mentors_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_mentors
    ADD CONSTRAINT batch_mentors_pkey PRIMARY KEY (id);


--
-- TOC entry 4786 (class 2606 OID 50019)
-- Name: batch_schedule batch_schedule_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_schedule
    ADD CONSTRAINT batch_schedule_pkey PRIMARY KEY (id);


--
-- TOC entry 4789 (class 2606 OID 50021)
-- Name: batch_students batch_students_batch_id_student_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_students
    ADD CONSTRAINT batch_students_batch_id_student_id_key UNIQUE (batch_id, student_id);


--
-- TOC entry 4791 (class 2606 OID 52110)
-- Name: batch_students batch_students_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_students
    ADD CONSTRAINT batch_students_pkey PRIMARY KEY (id);


--
-- TOC entry 4793 (class 2606 OID 50025)
-- Name: batch_trainers batch_trainers_batch_id_trainer_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_trainers
    ADD CONSTRAINT batch_trainers_batch_id_trainer_id_key UNIQUE (batch_id, trainer_id);


--
-- TOC entry 4795 (class 2606 OID 52122)
-- Name: batch_trainers batch_trainers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_trainers
    ADD CONSTRAINT batch_trainers_pkey PRIMARY KEY (id);


--
-- TOC entry 4797 (class 2606 OID 50029)
-- Name: batches batches_batch_code_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batches
    ADD CONSTRAINT batches_batch_code_key UNIQUE (batch_code);


--
-- TOC entry 4799 (class 2606 OID 50031)
-- Name: batches batches_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batches
    ADD CONSTRAINT batches_pkey PRIMARY KEY (id);


--
-- TOC entry 4801 (class 2606 OID 52153)
-- Name: branding_settings branding_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.branding_settings
    ADD CONSTRAINT branding_settings_pkey PRIMARY KEY (id);


--
-- TOC entry 4803 (class 2606 OID 50035)
-- Name: branding_settings branding_settings_setting_key_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.branding_settings
    ADD CONSTRAINT branding_settings_setting_key_key UNIQUE (setting_key);


--
-- TOC entry 4805 (class 2606 OID 52171)
-- Name: breakout_room_participants breakout_room_participants_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.breakout_room_participants
    ADD CONSTRAINT breakout_room_participants_pkey PRIMARY KEY (id);


--
-- TOC entry 4807 (class 2606 OID 50039)
-- Name: breakout_rooms breakout_rooms_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.breakout_rooms
    ADD CONSTRAINT breakout_rooms_pkey PRIMARY KEY (id);


--
-- TOC entry 4809 (class 2606 OID 50041)
-- Name: bundle_courses bundle_courses_bundle_id_course_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bundle_courses
    ADD CONSTRAINT bundle_courses_bundle_id_course_id_key UNIQUE (bundle_id, course_id);


--
-- TOC entry 4811 (class 2606 OID 52189)
-- Name: bundle_courses bundle_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bundle_courses
    ADD CONSTRAINT bundle_courses_pkey PRIMARY KEY (id);


--
-- TOC entry 4813 (class 2606 OID 52215)
-- Name: bundle_enrollments bundle_enrollments_bundle_id_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bundle_enrollments
    ADD CONSTRAINT bundle_enrollments_bundle_id_user_id_key UNIQUE (bundle_id, user_id);


--
-- TOC entry 4815 (class 2606 OID 52201)
-- Name: bundle_enrollments bundle_enrollments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bundle_enrollments
    ADD CONSTRAINT bundle_enrollments_pkey PRIMARY KEY (id);


--
-- TOC entry 4819 (class 2606 OID 50049)
-- Name: certificate_templates certificate_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.certificate_templates
    ADD CONSTRAINT certificate_templates_pkey PRIMARY KEY (id);


--
-- TOC entry 4821 (class 2606 OID 50051)
-- Name: competencies competencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competencies
    ADD CONSTRAINT competencies_pkey PRIMARY KEY (id);


--
-- TOC entry 4825 (class 2606 OID 52248)
-- Name: competency_assessment_attempts competency_assessment_attempts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_assessment_attempts
    ADD CONSTRAINT competency_assessment_attempts_pkey PRIMARY KEY (id);


--
-- TOC entry 4827 (class 2606 OID 50055)
-- Name: competency_assessment_questions competency_assessment_questions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_assessment_questions
    ADD CONSTRAINT competency_assessment_questions_pkey PRIMARY KEY (id);


--
-- TOC entry 4829 (class 2606 OID 50057)
-- Name: competency_assessments competency_assessments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_assessments
    ADD CONSTRAINT competency_assessments_pkey PRIMARY KEY (id);


--
-- TOC entry 4831 (class 2606 OID 52296)
-- Name: competency_history competency_history_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_history
    ADD CONSTRAINT competency_history_pkey PRIMARY KEY (id);


--
-- TOC entry 4835 (class 2606 OID 50061)
-- Name: competency_role_mapping competency_role_mapping_competency_id_organizational_role_i_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_role_mapping
    ADD CONSTRAINT competency_role_mapping_competency_id_organizational_role_i_key UNIQUE (competency_id, organizational_role_id);


--
-- TOC entry 4837 (class 2606 OID 52325)
-- Name: competency_role_mapping competency_role_mapping_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_role_mapping
    ADD CONSTRAINT competency_role_mapping_pkey PRIMARY KEY (id);


--
-- TOC entry 4841 (class 2606 OID 52341)
-- Name: competency_validity_rules competency_validity_rules_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_validity_rules
    ADD CONSTRAINT competency_validity_rules_pkey PRIMARY KEY (id);


--
-- TOC entry 4843 (class 2606 OID 52349)
-- Name: competency_verifications competency_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_verifications
    ADD CONSTRAINT competency_verifications_pkey PRIMARY KEY (id);


--
-- TOC entry 4848 (class 2606 OID 50069)
-- Name: competency_versions competency_versions_competency_id_version_number_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_versions
    ADD CONSTRAINT competency_versions_competency_id_version_number_key UNIQUE (competency_id, version_number);


--
-- TOC entry 4850 (class 2606 OID 52390)
-- Name: competency_versions competency_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_versions
    ADD CONSTRAINT competency_versions_pkey PRIMARY KEY (id);


--
-- TOC entry 4852 (class 2606 OID 52416)
-- Name: content_progress content_progress_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.content_progress
    ADD CONSTRAINT content_progress_pkey PRIMARY KEY (id);


--
-- TOC entry 4854 (class 2606 OID 50075)
-- Name: content_progress content_progress_user_id_content_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.content_progress
    ADD CONSTRAINT content_progress_user_id_content_id_key UNIQUE (user_id, content_id);


--
-- TOC entry 4856 (class 2606 OID 50077)
-- Name: course_bundles course_bundles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_bundles
    ADD CONSTRAINT course_bundles_pkey PRIMARY KEY (id);


--
-- TOC entry 4859 (class 2606 OID 50079)
-- Name: course_competencies course_competencies_course_id_competency_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_competencies
    ADD CONSTRAINT course_competencies_course_id_competency_id_key UNIQUE (course_id, competency_id);


--
-- TOC entry 4861 (class 2606 OID 52456)
-- Name: course_competencies course_competencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_competencies
    ADD CONSTRAINT course_competencies_pkey PRIMARY KEY (id);


--
-- TOC entry 4864 (class 2606 OID 50083)
-- Name: course_modules course_modules_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_modules
    ADD CONSTRAINT course_modules_pkey PRIMARY KEY (id);


--
-- TOC entry 4866 (class 2606 OID 50085)
-- Name: course_trainers course_trainers_course_id_trainer_id_module_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_trainers
    ADD CONSTRAINT course_trainers_course_id_trainer_id_module_id_key UNIQUE (course_id, trainer_id, module_id);


--
-- TOC entry 4868 (class 2606 OID 52473)
-- Name: course_trainers course_trainers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_trainers
    ADD CONSTRAINT course_trainers_pkey PRIMARY KEY (id);


--
-- TOC entry 4870 (class 2606 OID 52487)
-- Name: course_waitlist course_waitlist_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_waitlist
    ADD CONSTRAINT course_waitlist_pkey PRIMARY KEY (id);


--
-- TOC entry 4878 (class 2606 OID 50091)
-- Name: courses courses_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.courses
    ADD CONSTRAINT courses_pkey PRIMARY KEY (id);


--
-- TOC entry 4883 (class 2606 OID 50093)
-- Name: customer_batch_access customer_batch_access_organization_id_batch_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_batch_access
    ADD CONSTRAINT customer_batch_access_organization_id_batch_id_key UNIQUE (organization_id, batch_id);


--
-- TOC entry 4885 (class 2606 OID 52567)
-- Name: customer_batch_access customer_batch_access_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_batch_access
    ADD CONSTRAINT customer_batch_access_pkey PRIMARY KEY (id);


--
-- TOC entry 4889 (class 2606 OID 52594)
-- Name: customer_batch_enrollments customer_batch_enrollments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_batch_enrollments
    ADD CONSTRAINT customer_batch_enrollments_pkey PRIMARY KEY (id);


--
-- TOC entry 4891 (class 2606 OID 52610)
-- Name: customer_batch_enrollments customer_batch_enrollments_user_id_batch_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_batch_enrollments
    ADD CONSTRAINT customer_batch_enrollments_user_id_batch_id_key UNIQUE (user_id, batch_id);


--
-- TOC entry 4896 (class 2606 OID 50101)
-- Name: customer_course_access customer_course_access_organization_id_course_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_course_access
    ADD CONSTRAINT customer_course_access_organization_id_course_id_key UNIQUE (organization_id, course_id);


--
-- TOC entry 4898 (class 2606 OID 52624)
-- Name: customer_course_access customer_course_access_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_course_access
    ADD CONSTRAINT customer_course_access_pkey PRIMARY KEY (id);


--
-- TOC entry 4902 (class 2606 OID 52640)
-- Name: customer_enrollments customer_enrollments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_enrollments
    ADD CONSTRAINT customer_enrollments_pkey PRIMARY KEY (id);


--
-- TOC entry 4904 (class 2606 OID 52649)
-- Name: customer_enrollments customer_enrollments_user_id_course_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_enrollments
    ADD CONSTRAINT customer_enrollments_user_id_course_id_key UNIQUE (user_id, course_id);


--
-- TOC entry 4906 (class 2606 OID 50109)
-- Name: customer_organizations customer_organizations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_organizations
    ADD CONSTRAINT customer_organizations_pkey PRIMARY KEY (id);


--
-- TOC entry 4908 (class 2606 OID 50111)
-- Name: customer_organizations customer_organizations_slug_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_organizations
    ADD CONSTRAINT customer_organizations_slug_key UNIQUE (slug);


--
-- TOC entry 4911 (class 2606 OID 52682)
-- Name: customer_portal_admins customer_portal_admins_organization_id_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_portal_admins
    ADD CONSTRAINT customer_portal_admins_organization_id_user_id_key UNIQUE (organization_id, user_id);


--
-- TOC entry 4913 (class 2606 OID 52664)
-- Name: customer_portal_admins customer_portal_admins_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_portal_admins
    ADD CONSTRAINT customer_portal_admins_pkey PRIMARY KEY (id);


--
-- TOC entry 4915 (class 2606 OID 50117)
-- Name: customer_portal_invitations customer_portal_invitations_organization_id_email_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_portal_invitations
    ADD CONSTRAINT customer_portal_invitations_organization_id_email_key UNIQUE (organization_id, email);


--
-- TOC entry 4917 (class 2606 OID 52692)
-- Name: customer_portal_invitations customer_portal_invitations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_portal_invitations
    ADD CONSTRAINT customer_portal_invitations_pkey PRIMARY KEY (id);


--
-- TOC entry 4922 (class 2606 OID 52728)
-- Name: dashboard_configurations dashboard_configurations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.dashboard_configurations
    ADD CONSTRAINT dashboard_configurations_pkey PRIMARY KEY (id);


--
-- TOC entry 4926 (class 2606 OID 50123)
-- Name: dashboard_templates dashboard_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.dashboard_templates
    ADD CONSTRAINT dashboard_templates_pkey PRIMARY KEY (id);


--
-- TOC entry 4928 (class 2606 OID 52759)
-- Name: dashboard_widgets dashboard_widgets_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.dashboard_widgets
    ADD CONSTRAINT dashboard_widgets_pkey PRIMARY KEY (id);


--
-- TOC entry 4930 (class 2606 OID 52782)
-- Name: data_export_requests data_export_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.data_export_requests
    ADD CONSTRAINT data_export_requests_pkey PRIMARY KEY (id);


--
-- TOC entry 4933 (class 2606 OID 50129)
-- Name: department_competency_levels department_competency_levels_department_id_competency_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.department_competency_levels
    ADD CONSTRAINT department_competency_levels_department_id_competency_id_key UNIQUE (department_id, competency_id);


--
-- TOC entry 4935 (class 2606 OID 52800)
-- Name: department_competency_levels department_competency_levels_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.department_competency_levels
    ADD CONSTRAINT department_competency_levels_pkey PRIMARY KEY (id);


--
-- TOC entry 4939 (class 2606 OID 50133)
-- Name: departments departments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.departments
    ADD CONSTRAINT departments_pkey PRIMARY KEY (id);


--
-- TOC entry 4943 (class 2606 OID 50135)
-- Name: designation_competencies designation_competencies_designation_id_competency_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.designation_competencies
    ADD CONSTRAINT designation_competencies_designation_id_competency_id_key UNIQUE (designation_id, competency_id);


--
-- TOC entry 4945 (class 2606 OID 52829)
-- Name: designation_competencies designation_competencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.designation_competencies
    ADD CONSTRAINT designation_competencies_pkey PRIMARY KEY (id);


--
-- TOC entry 4947 (class 2606 OID 50139)
-- Name: designations designations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.designations
    ADD CONSTRAINT designations_pkey PRIMARY KEY (id);


--
-- TOC entry 4949 (class 2606 OID 52850)
-- Name: employee_assignments employee_assignments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.employee_assignments
    ADD CONSTRAINT employee_assignments_pkey PRIMARY KEY (id);


--
-- TOC entry 4955 (class 2606 OID 52918)
-- Name: enrollment_requests enrollment_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.enrollment_requests
    ADD CONSTRAINT enrollment_requests_pkey PRIMARY KEY (id);


--
-- TOC entry 4960 (class 2606 OID 50145)
-- Name: enrollments enrollments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.enrollments
    ADD CONSTRAINT enrollments_pkey PRIMARY KEY (id);


--
-- TOC entry 4962 (class 2606 OID 50147)
-- Name: enrollments enrollments_user_id_course_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.enrollments
    ADD CONSTRAINT enrollments_user_id_course_id_key UNIQUE (user_id, course_id);


--
-- TOC entry 4965 (class 2606 OID 52975)
-- Name: external_assessment_results external_assessment_results_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.external_assessment_results
    ADD CONSTRAINT external_assessment_results_pkey PRIMARY KEY (id);


--
-- TOC entry 4968 (class 2606 OID 50151)
-- Name: external_assessments external_assessments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.external_assessments
    ADD CONSTRAINT external_assessments_pkey PRIMARY KEY (id);


--
-- TOC entry 4970 (class 2606 OID 53017)
-- Name: external_user_profiles external_user_profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.external_user_profiles
    ADD CONSTRAINT external_user_profiles_pkey PRIMARY KEY (id);


--
-- TOC entry 4972 (class 2606 OID 50155)
-- Name: external_user_profiles external_user_profiles_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.external_user_profiles
    ADD CONSTRAINT external_user_profiles_user_id_key UNIQUE (user_id);


--
-- TOC entry 4976 (class 2606 OID 53043)
-- Name: feedback_analytics feedback_analytics_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_analytics
    ADD CONSTRAINT feedback_analytics_pkey PRIMARY KEY (id);


--
-- TOC entry 4978 (class 2606 OID 50159)
-- Name: feedback_questions feedback_questions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_questions
    ADD CONSTRAINT feedback_questions_pkey PRIMARY KEY (id);


--
-- TOC entry 4981 (class 2606 OID 53091)
-- Name: feedback_response_answers feedback_response_answers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_response_answers
    ADD CONSTRAINT feedback_response_answers_pkey PRIMARY KEY (id);


--
-- TOC entry 4984 (class 2606 OID 50163)
-- Name: feedback_responses feedback_responses_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_responses
    ADD CONSTRAINT feedback_responses_pkey PRIMARY KEY (id);


--
-- TOC entry 4986 (class 2606 OID 50165)
-- Name: feedback_responses feedback_responses_template_id_trigger_id_user_id_course_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_responses
    ADD CONSTRAINT feedback_responses_template_id_trigger_id_user_id_course_id_key UNIQUE (template_id, trigger_id, user_id, course_id, batch_id);


--
-- TOC entry 4991 (class 2606 OID 50167)
-- Name: feedback_templates feedback_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_templates
    ADD CONSTRAINT feedback_templates_pkey PRIMARY KEY (id);


--
-- TOC entry 4993 (class 2606 OID 50169)
-- Name: feedback_triggers feedback_triggers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_triggers
    ADD CONSTRAINT feedback_triggers_pkey PRIMARY KEY (id);


--
-- TOC entry 4996 (class 2606 OID 53147)
-- Name: gap_assignment_rules gap_assignment_rules_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.gap_assignment_rules
    ADD CONSTRAINT gap_assignment_rules_pkey PRIMARY KEY (id);


--
-- TOC entry 4998 (class 2606 OID 53156)
-- Name: help_article_media help_article_media_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_article_media
    ADD CONSTRAINT help_article_media_pkey PRIMARY KEY (id);


--
-- TOC entry 5000 (class 2606 OID 53165)
-- Name: help_article_sections help_article_sections_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_article_sections
    ADD CONSTRAINT help_article_sections_pkey PRIMARY KEY (id);


--
-- TOC entry 5002 (class 2606 OID 53174)
-- Name: help_article_steps help_article_steps_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_article_steps
    ADD CONSTRAINT help_article_steps_pkey PRIMARY KEY (id);


--
-- TOC entry 5004 (class 2606 OID 50179)
-- Name: help_articles help_articles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_articles
    ADD CONSTRAINT help_articles_pkey PRIMARY KEY (id);


--
-- TOC entry 5006 (class 2606 OID 50181)
-- Name: help_categories help_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_categories
    ADD CONSTRAINT help_categories_pkey PRIMARY KEY (id);


--
-- TOC entry 5008 (class 2606 OID 50183)
-- Name: help_related_articles help_related_articles_article_id_related_article_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_related_articles
    ADD CONSTRAINT help_related_articles_article_id_related_article_id_key UNIQUE (article_id, related_article_id);


--
-- TOC entry 5010 (class 2606 OID 53196)
-- Name: help_related_articles help_related_articles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_related_articles
    ADD CONSTRAINT help_related_articles_pkey PRIMARY KEY (id);


--
-- TOC entry 5012 (class 2606 OID 53208)
-- Name: hrms_configurations hrms_configurations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.hrms_configurations
    ADD CONSTRAINT hrms_configurations_pkey PRIMARY KEY (id);


--
-- TOC entry 5014 (class 2606 OID 53224)
-- Name: hrms_sync_logs hrms_sync_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.hrms_sync_logs
    ADD CONSTRAINT hrms_sync_logs_pkey PRIMARY KEY (id);


--
-- TOC entry 5018 (class 2606 OID 53261)
-- Name: inferred_skills inferred_skills_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.inferred_skills
    ADD CONSTRAINT inferred_skills_pkey PRIMARY KEY (id);


--
-- TOC entry 5020 (class 2606 OID 53296)
-- Name: inferred_skills inferred_skills_user_id_competency_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.inferred_skills
    ADD CONSTRAINT inferred_skills_user_id_competency_id_key UNIQUE (user_id, competency_id);


--
-- TOC entry 5026 (class 2606 OID 50195)
-- Name: issued_certificates issued_certificates_certificate_number_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.issued_certificates
    ADD CONSTRAINT issued_certificates_certificate_number_key UNIQUE (certificate_number);


--
-- TOC entry 5028 (class 2606 OID 50197)
-- Name: issued_certificates issued_certificates_enrollment_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.issued_certificates
    ADD CONSTRAINT issued_certificates_enrollment_id_key UNIQUE (enrollment_id);


--
-- TOC entry 5030 (class 2606 OID 53306)
-- Name: issued_certificates issued_certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.issued_certificates
    ADD CONSTRAINT issued_certificates_pkey PRIMARY KEY (id);


--
-- TOC entry 5032 (class 2606 OID 50201)
-- Name: issued_certificates issued_certificates_verification_code_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.issued_certificates
    ADD CONSTRAINT issued_certificates_verification_code_key UNIQUE (verification_code);


--
-- TOC entry 5034 (class 2606 OID 50203)
-- Name: job_families job_families_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.job_families
    ADD CONSTRAINT job_families_pkey PRIMARY KEY (id);


--
-- TOC entry 5038 (class 2606 OID 50205)
-- Name: job_family_competencies job_family_competencies_job_family_id_competency_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.job_family_competencies
    ADD CONSTRAINT job_family_competencies_job_family_id_competency_id_key UNIQUE (job_family_id, competency_id);


--
-- TOC entry 5040 (class 2606 OID 53360)
-- Name: job_family_competencies job_family_competencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.job_family_competencies
    ADD CONSTRAINT job_family_competencies_pkey PRIMARY KEY (id);


--
-- TOC entry 5042 (class 2606 OID 50209)
-- Name: kpi_definitions kpi_definitions_kpi_key_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.kpi_definitions
    ADD CONSTRAINT kpi_definitions_kpi_key_key UNIQUE (kpi_key);


--
-- TOC entry 5044 (class 2606 OID 50211)
-- Name: kpi_definitions kpi_definitions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.kpi_definitions
    ADD CONSTRAINT kpi_definitions_pkey PRIMARY KEY (id);


--
-- TOC entry 5048 (class 2606 OID 50213)
-- Name: landing_pages landing_pages_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.landing_pages
    ADD CONSTRAINT landing_pages_pkey PRIMARY KEY (id);


--
-- TOC entry 5050 (class 2606 OID 50215)
-- Name: landing_pages landing_pages_slug_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.landing_pages
    ADD CONSTRAINT landing_pages_slug_key UNIQUE (slug);


--
-- TOC entry 5053 (class 2606 OID 53453)
-- Name: learner_badges learner_badges_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_badges
    ADD CONSTRAINT learner_badges_pkey PRIMARY KEY (id);


--
-- TOC entry 5055 (class 2606 OID 50219)
-- Name: learner_badges learner_badges_user_id_badge_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_badges
    ADD CONSTRAINT learner_badges_user_id_badge_id_key UNIQUE (user_id, badge_id);


--
-- TOC entry 5059 (class 2606 OID 53467)
-- Name: learner_competency_progress learner_competency_progress_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_competency_progress
    ADD CONSTRAINT learner_competency_progress_pkey PRIMARY KEY (id);


--
-- TOC entry 5061 (class 2606 OID 50223)
-- Name: learner_competency_progress learner_competency_progress_user_id_competency_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_competency_progress
    ADD CONSTRAINT learner_competency_progress_user_id_competency_id_key UNIQUE (user_id, competency_id);


--
-- TOC entry 5065 (class 2606 OID 53500)
-- Name: learner_competency_scores learner_competency_scores_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_competency_scores
    ADD CONSTRAINT learner_competency_scores_pkey PRIMARY KEY (id);


--
-- TOC entry 5067 (class 2606 OID 50227)
-- Name: learner_competency_scores learner_competency_scores_user_id_competency_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_competency_scores
    ADD CONSTRAINT learner_competency_scores_user_id_competency_id_key UNIQUE (user_id, competency_id);


--
-- TOC entry 5069 (class 2606 OID 53527)
-- Name: learner_learning_paths learner_learning_paths_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_learning_paths
    ADD CONSTRAINT learner_learning_paths_pkey PRIMARY KEY (id);


--
-- TOC entry 5071 (class 2606 OID 53549)
-- Name: learner_learning_paths learner_learning_paths_user_id_learning_path_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_learning_paths
    ADD CONSTRAINT learner_learning_paths_user_id_learning_path_id_key UNIQUE (user_id, learning_path_id);


--
-- TOC entry 5073 (class 2606 OID 53551)
-- Name: learner_learning_paths learner_learning_paths_user_path_unique; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_learning_paths
    ADD CONSTRAINT learner_learning_paths_user_path_unique UNIQUE (user_id, learning_path_id);


--
-- TOC entry 5075 (class 2606 OID 53562)
-- Name: learner_notes learner_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_notes
    ADD CONSTRAINT learner_notes_pkey PRIMARY KEY (id);


--
-- TOC entry 5080 (class 2606 OID 53583)
-- Name: learner_notifications learner_notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_notifications
    ADD CONSTRAINT learner_notifications_pkey PRIMARY KEY (id);


--
-- TOC entry 5083 (class 2606 OID 53608)
-- Name: learner_points learner_points_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_points
    ADD CONSTRAINT learner_points_pkey PRIMARY KEY (id);


--
-- TOC entry 5085 (class 2606 OID 50241)
-- Name: learner_points learner_points_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_points
    ADD CONSTRAINT learner_points_user_id_key UNIQUE (user_id);


--
-- TOC entry 5089 (class 2606 OID 53629)
-- Name: learning_activity_log learning_activity_log_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_activity_log
    ADD CONSTRAINT learning_activity_log_pkey PRIMARY KEY (id);


--
-- TOC entry 5091 (class 2606 OID 53660)
-- Name: learning_path_ai_metadata learning_path_ai_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_path_ai_metadata
    ADD CONSTRAINT learning_path_ai_metadata_pkey PRIMARY KEY (id);


--
-- TOC entry 5093 (class 2606 OID 50247)
-- Name: learning_path_courses learning_path_courses_learning_path_id_course_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_path_courses
    ADD CONSTRAINT learning_path_courses_learning_path_id_course_id_key UNIQUE (learning_path_id, course_id);


--
-- TOC entry 5095 (class 2606 OID 53676)
-- Name: learning_path_courses learning_path_courses_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_path_courses
    ADD CONSTRAINT learning_path_courses_pkey PRIMARY KEY (id);


--
-- TOC entry 5097 (class 2606 OID 50251)
-- Name: learning_paths learning_paths_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_paths
    ADD CONSTRAINT learning_paths_pkey PRIMARY KEY (id);


--
-- TOC entry 5099 (class 2606 OID 53691)
-- Name: live_annotations live_annotations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.live_annotations
    ADD CONSTRAINT live_annotations_pkey PRIMARY KEY (id);


--
-- TOC entry 5101 (class 2606 OID 50255)
-- Name: meeting_integrations meeting_integrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.meeting_integrations
    ADD CONSTRAINT meeting_integrations_pkey PRIMARY KEY (id);


--
-- TOC entry 5103 (class 2606 OID 53755)
-- Name: mentor_learners mentor_learners_batch_id_mentor_id_learner_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.mentor_learners
    ADD CONSTRAINT mentor_learners_batch_id_mentor_id_learner_id_key UNIQUE (batch_id, mentor_id, learner_id);


--
-- TOC entry 5105 (class 2606 OID 53728)
-- Name: mentor_learners mentor_learners_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.mentor_learners
    ADD CONSTRAINT mentor_learners_pkey PRIMARY KEY (id);


--
-- TOC entry 5107 (class 2606 OID 53783)
-- Name: microlearning_assignments microlearning_assignments_microlearning_id_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.microlearning_assignments
    ADD CONSTRAINT microlearning_assignments_microlearning_id_user_id_key UNIQUE (microlearning_id, user_id);


--
-- TOC entry 5109 (class 2606 OID 53765)
-- Name: microlearning_assignments microlearning_assignments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.microlearning_assignments
    ADD CONSTRAINT microlearning_assignments_pkey PRIMARY KEY (id);


--
-- TOC entry 5112 (class 2606 OID 50265)
-- Name: microlearning_content microlearning_content_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.microlearning_content
    ADD CONSTRAINT microlearning_content_pkey PRIMARY KEY (id);


--
-- TOC entry 5114 (class 2606 OID 53821)
-- Name: microlearning_progress microlearning_progress_microlearning_id_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.microlearning_progress
    ADD CONSTRAINT microlearning_progress_microlearning_id_user_id_key UNIQUE (microlearning_id, user_id);


--
-- TOC entry 5116 (class 2606 OID 53812)
-- Name: microlearning_progress microlearning_progress_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.microlearning_progress
    ADD CONSTRAINT microlearning_progress_pkey PRIMARY KEY (id);


--
-- TOC entry 5118 (class 2606 OID 50271)
-- Name: module_content module_content_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.module_content
    ADD CONSTRAINT module_content_pkey PRIMARY KEY (id);


--
-- TOC entry 5122 (class 2606 OID 50273)
-- Name: navigation_items navigation_items_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.navigation_items
    ADD CONSTRAINT navigation_items_pkey PRIMARY KEY (id);


--
-- TOC entry 5124 (class 2606 OID 50275)
-- Name: navigation_menus navigation_menus_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.navigation_menus
    ADD CONSTRAINT navigation_menus_pkey PRIMARY KEY (id);


--
-- TOC entry 5126 (class 2606 OID 50277)
-- Name: okr_competency_links okr_competency_links_okr_id_competency_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.okr_competency_links
    ADD CONSTRAINT okr_competency_links_okr_id_competency_id_key UNIQUE (okr_id, competency_id);


--
-- TOC entry 5128 (class 2606 OID 50279)
-- Name: okr_competency_links okr_competency_links_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.okr_competency_links
    ADD CONSTRAINT okr_competency_links_pkey PRIMARY KEY (id);


--
-- TOC entry 5130 (class 2606 OID 50281)
-- Name: okrs okrs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.okrs
    ADD CONSTRAINT okrs_pkey PRIMARY KEY (id);


--
-- TOC entry 5134 (class 2606 OID 50283)
-- Name: org_structure_audit org_structure_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.org_structure_audit
    ADD CONSTRAINT org_structure_audit_pkey PRIMARY KEY (id);


--
-- TOC entry 5138 (class 2606 OID 50285)
-- Name: organizational_roles organizational_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.organizational_roles
    ADD CONSTRAINT organizational_roles_pkey PRIMARY KEY (id);


--
-- TOC entry 5142 (class 2606 OID 50287)
-- Name: page_sections page_sections_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.page_sections
    ADD CONSTRAINT page_sections_pkey PRIMARY KEY (id);


--
-- TOC entry 5144 (class 2606 OID 50289)
-- Name: path_adaptations path_adaptations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.path_adaptations
    ADD CONSTRAINT path_adaptations_pkey PRIMARY KEY (id);


--
-- TOC entry 5146 (class 2606 OID 50291)
-- Name: personalized_paths personalized_paths_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.personalized_paths
    ADD CONSTRAINT personalized_paths_pkey PRIMARY KEY (id);


--
-- TOC entry 5148 (class 2606 OID 50293)
-- Name: point_rules point_rules_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.point_rules
    ADD CONSTRAINT point_rules_pkey PRIMARY KEY (id);


--
-- TOC entry 5152 (class 2606 OID 50295)
-- Name: point_transactions point_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.point_transactions
    ADD CONSTRAINT point_transactions_pkey PRIMARY KEY (id);


--
-- TOC entry 5155 (class 2606 OID 50297)
-- Name: poll_questions poll_questions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_questions
    ADD CONSTRAINT poll_questions_pkey PRIMARY KEY (id);


--
-- TOC entry 5158 (class 2606 OID 50299)
-- Name: poll_responses poll_responses_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_responses
    ADD CONSTRAINT poll_responses_pkey PRIMARY KEY (id);


--
-- TOC entry 5160 (class 2606 OID 50301)
-- Name: poll_responses poll_responses_session_id_question_id_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_responses
    ADD CONSTRAINT poll_responses_session_id_question_id_user_id_key UNIQUE (session_id, question_id, user_id);


--
-- TOC entry 5162 (class 2606 OID 50303)
-- Name: poll_results_cache poll_results_cache_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_results_cache
    ADD CONSTRAINT poll_results_cache_pkey PRIMARY KEY (id);


--
-- TOC entry 5164 (class 2606 OID 50305)
-- Name: poll_results_cache poll_results_cache_session_id_question_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_results_cache
    ADD CONSTRAINT poll_results_cache_session_id_question_id_key UNIQUE (session_id, question_id);


--
-- TOC entry 5168 (class 2606 OID 50307)
-- Name: poll_sessions poll_sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_sessions
    ADD CONSTRAINT poll_sessions_pkey PRIMARY KEY (id);


--
-- TOC entry 5170 (class 2606 OID 50309)
-- Name: poll_templates poll_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_templates
    ADD CONSTRAINT poll_templates_pkey PRIMARY KEY (id);


--
-- TOC entry 5172 (class 2606 OID 50311)
-- Name: proficiency_scale_levels proficiency_scale_levels_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.proficiency_scale_levels
    ADD CONSTRAINT proficiency_scale_levels_pkey PRIMARY KEY (id);


--
-- TOC entry 5174 (class 2606 OID 50313)
-- Name: proficiency_scale_levels proficiency_scale_levels_scale_id_level_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.proficiency_scale_levels
    ADD CONSTRAINT proficiency_scale_levels_scale_id_level_key UNIQUE (scale_id, level);


--
-- TOC entry 5176 (class 2606 OID 50315)
-- Name: proficiency_scales proficiency_scales_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.proficiency_scales
    ADD CONSTRAINT proficiency_scales_pkey PRIMARY KEY (id);


--
-- TOC entry 5179 (class 2606 OID 50317)
-- Name: profiles profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.profiles
    ADD CONSTRAINT profiles_pkey PRIMARY KEY (id);


--
-- TOC entry 5182 (class 2606 OID 50319)
-- Name: question_analytics question_analytics_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.question_analytics
    ADD CONSTRAINT question_analytics_pkey PRIMARY KEY (id);


--
-- TOC entry 5189 (class 2606 OID 50321)
-- Name: question_bank question_bank_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.question_bank
    ADD CONSTRAINT question_bank_pkey PRIMARY KEY (id);


--
-- TOC entry 5191 (class 2606 OID 50323)
-- Name: role_permissions role_permissions_designation_id_permission_key_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.role_permissions
    ADD CONSTRAINT role_permissions_designation_id_permission_key_key UNIQUE (designation_id, permission_key);


--
-- TOC entry 5193 (class 2606 OID 50325)
-- Name: role_permissions role_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.role_permissions
    ADD CONSTRAINT role_permissions_pkey PRIMARY KEY (id);


--
-- TOC entry 5197 (class 2606 OID 50327)
-- Name: scheduled_reassessments scheduled_reassessments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.scheduled_reassessments
    ADD CONSTRAINT scheduled_reassessments_pkey PRIMARY KEY (id);


--
-- TOC entry 5199 (class 2606 OID 50329)
-- Name: score_level_mappings score_level_mappings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.score_level_mappings
    ADD CONSTRAINT score_level_mappings_pkey PRIMARY KEY (id);


--
-- TOC entry 5201 (class 2606 OID 50331)
-- Name: score_level_mappings score_level_mappings_proficiency_scale_id_level_number_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.score_level_mappings
    ADD CONSTRAINT score_level_mappings_proficiency_scale_id_level_number_key UNIQUE (proficiency_scale_id, level_number);


--
-- TOC entry 5203 (class 2606 OID 50333)
-- Name: section_templates section_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.section_templates
    ADD CONSTRAINT section_templates_pkey PRIMARY KEY (id);


--
-- TOC entry 5205 (class 2606 OID 50335)
-- Name: session_interactions session_interactions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.session_interactions
    ADD CONSTRAINT session_interactions_pkey PRIMARY KEY (id);


--
-- TOC entry 5209 (class 2606 OID 50337)
-- Name: session_reminders session_reminders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.session_reminders
    ADD CONSTRAINT session_reminders_pkey PRIMARY KEY (id);


--
-- TOC entry 5211 (class 2606 OID 50339)
-- Name: skill_mapping_suggestions skill_mapping_suggestions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.skill_mapping_suggestions
    ADD CONSTRAINT skill_mapping_suggestions_pkey PRIMARY KEY (id);


--
-- TOC entry 5213 (class 2606 OID 50341)
-- Name: streak_tracker streak_tracker_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.streak_tracker
    ADD CONSTRAINT streak_tracker_pkey PRIMARY KEY (id);


--
-- TOC entry 5215 (class 2606 OID 50343)
-- Name: streak_tracker streak_tracker_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.streak_tracker
    ADD CONSTRAINT streak_tracker_user_id_key UNIQUE (user_id);


--
-- TOC entry 5217 (class 2606 OID 50345)
-- Name: tag_taxonomy tag_taxonomy_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tag_taxonomy
    ADD CONSTRAINT tag_taxonomy_pkey PRIMARY KEY (id);


--
-- TOC entry 5219 (class 2606 OID 50347)
-- Name: trainer_feedback_responses trainer_feedback_responses_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.trainer_feedback_responses
    ADD CONSTRAINT trainer_feedback_responses_pkey PRIMARY KEY (id);


--
-- TOC entry 5221 (class 2606 OID 50349)
-- Name: trainer_feedback_surveys trainer_feedback_surveys_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.trainer_feedback_surveys
    ADD CONSTRAINT trainer_feedback_surveys_pkey PRIMARY KEY (id);


--
-- TOC entry 5223 (class 2606 OID 50351)
-- Name: trainer_ratings trainer_ratings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.trainer_ratings
    ADD CONSTRAINT trainer_ratings_pkey PRIMARY KEY (id);


--
-- TOC entry 5225 (class 2606 OID 50353)
-- Name: trainer_ratings trainer_ratings_trainer_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.trainer_ratings
    ADD CONSTRAINT trainer_ratings_trainer_id_key UNIQUE (trainer_id);


--
-- TOC entry 5227 (class 2606 OID 50355)
-- Name: trainers trainers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.trainers
    ADD CONSTRAINT trainers_pkey PRIMARY KEY (id);


--
-- TOC entry 5184 (class 2606 OID 50357)
-- Name: question_analytics unique_question_assessment; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.question_analytics
    ADD CONSTRAINT unique_question_assessment UNIQUE (question_id, assessment_id);


--
-- TOC entry 5063 (class 2606 OID 50359)
-- Name: learner_competency_progress unique_user_competency; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_competency_progress
    ADD CONSTRAINT unique_user_competency UNIQUE (user_id, competency_id);


--
-- TOC entry 5077 (class 2606 OID 53573)
-- Name: learner_notes unique_user_module_note; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_notes
    ADD CONSTRAINT unique_user_module_note UNIQUE (user_id, module_id);


--
-- TOC entry 4876 (class 2606 OID 52506)
-- Name: course_waitlist unique_waitlist_entry; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_waitlist
    ADD CONSTRAINT unique_waitlist_entry UNIQUE (course_id, batch_id, learner_id);


--
-- TOC entry 5230 (class 2606 OID 50365)
-- Name: user_competencies user_competencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_competencies
    ADD CONSTRAINT user_competencies_pkey PRIMARY KEY (id);


--
-- TOC entry 5232 (class 2606 OID 50367)
-- Name: user_competencies user_competencies_user_id_competency_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_competencies
    ADD CONSTRAINT user_competencies_user_id_competency_id_key UNIQUE (user_id, competency_id);


--
-- TOC entry 5234 (class 2606 OID 50369)
-- Name: user_consent_records user_consent_records_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_consent_records
    ADD CONSTRAINT user_consent_records_pkey PRIMARY KEY (id);


--
-- TOC entry 5236 (class 2606 OID 50371)
-- Name: user_dashboard_layouts user_dashboard_layouts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_dashboard_layouts
    ADD CONSTRAINT user_dashboard_layouts_pkey PRIMARY KEY (id);


--
-- TOC entry 5238 (class 2606 OID 50373)
-- Name: user_dashboard_layouts user_dashboard_layouts_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_dashboard_layouts
    ADD CONSTRAINT user_dashboard_layouts_user_id_key UNIQUE (user_id);


--
-- TOC entry 5240 (class 2606 OID 50375)
-- Name: user_departments user_departments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_departments
    ADD CONSTRAINT user_departments_pkey PRIMARY KEY (id);


--
-- TOC entry 5242 (class 2606 OID 50377)
-- Name: user_departments user_departments_user_id_department_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_departments
    ADD CONSTRAINT user_departments_user_id_department_id_key UNIQUE (user_id, department_id);


--
-- TOC entry 5244 (class 2606 OID 50379)
-- Name: user_managers user_managers_manager_id_subordinate_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_managers
    ADD CONSTRAINT user_managers_manager_id_subordinate_id_key UNIQUE (manager_id, subordinate_id);


--
-- TOC entry 5246 (class 2606 OID 50381)
-- Name: user_managers user_managers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_managers
    ADD CONSTRAINT user_managers_pkey PRIMARY KEY (id);


--
-- TOC entry 5248 (class 2606 OID 50383)
-- Name: user_mfa_settings user_mfa_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_mfa_settings
    ADD CONSTRAINT user_mfa_settings_pkey PRIMARY KEY (id);


--
-- TOC entry 5250 (class 2606 OID 50385)
-- Name: user_mfa_settings user_mfa_settings_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_mfa_settings
    ADD CONSTRAINT user_mfa_settings_user_id_key UNIQUE (user_id);


--
-- TOC entry 5252 (class 2606 OID 50387)
-- Name: user_roles user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_roles
    ADD CONSTRAINT user_roles_pkey PRIMARY KEY (id);


--
-- TOC entry 5254 (class 2606 OID 50389)
-- Name: user_roles user_roles_user_id_role_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_roles
    ADD CONSTRAINT user_roles_user_id_role_key UNIQUE (user_id, role);


--
-- TOC entry 5256 (class 2606 OID 50391)
-- Name: user_type_ui_config user_type_ui_config_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_type_ui_config
    ADD CONSTRAINT user_type_ui_config_pkey PRIMARY KEY (id);


--
-- TOC entry 5258 (class 2606 OID 50393)
-- Name: user_type_ui_config user_type_ui_config_user_type_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_type_ui_config
    ADD CONSTRAINT user_type_ui_config_user_type_key UNIQUE (user_type);


--
-- TOC entry 4723 (class 2606 OID 48453)
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_pkey PRIMARY KEY (id);


--
-- TOC entry 5263 (class 2606 OID 50395)
-- Name: xapi_statements xapi_statements_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.xapi_statements
    ADD CONSTRAINT xapi_statements_pkey PRIMARY KEY (id);


--
-- TOC entry 5265 (class 2606 OID 50397)
-- Name: xapi_statements xapi_statements_statement_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.xapi_statements
    ADD CONSTRAINT xapi_statements_statement_id_key UNIQUE (statement_id);


--
-- TOC entry 4726 (class 1259 OID 51686)
-- Name: idx_account_deletion_requests_user_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_account_deletion_requests_user_id ON public.account_deletion_requests USING btree (user_id);


--
-- TOC entry 4735 (class 1259 OID 51773)
-- Name: idx_assessment_assignment_learners_learner; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_assessment_assignment_learners_learner ON public.assessment_assignment_learners USING btree (learner_id);


--
-- TOC entry 4736 (class 1259 OID 50400)
-- Name: idx_assessment_assignment_learners_status; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_assessment_assignment_learners_status ON public.assessment_assignment_learners USING btree (status);


--
-- TOC entry 4739 (class 1259 OID 50401)
-- Name: idx_assessment_assignments_assessment; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_assessment_assignments_assessment ON public.assessment_assignments USING btree (assessment_id);


--
-- TOC entry 4744 (class 1259 OID 50402)
-- Name: idx_assessment_question_links_assessment; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_assessment_question_links_assessment ON public.assessment_question_links USING btree (assessment_id);


--
-- TOC entry 4761 (class 1259 OID 50403)
-- Name: idx_assignment_submissions_batch_assignment_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_assignment_submissions_batch_assignment_id ON public.assignment_submissions USING btree (batch_assignment_id);


--
-- TOC entry 4770 (class 1259 OID 50404)
-- Name: idx_audit_logs_action_type; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_audit_logs_action_type ON public.audit_logs USING btree (action_type);


--
-- TOC entry 4771 (class 1259 OID 50405)
-- Name: idx_audit_logs_created_at; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_audit_logs_created_at ON public.audit_logs USING btree (created_at);


--
-- TOC entry 4772 (class 1259 OID 51978)
-- Name: idx_audit_logs_user_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_audit_logs_user_id ON public.audit_logs USING btree (user_id);


--
-- TOC entry 4787 (class 1259 OID 50407)
-- Name: idx_batch_schedule_meeting; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_batch_schedule_meeting ON public.batch_schedule USING btree (meeting_integration_id);


--
-- TOC entry 4816 (class 1259 OID 50408)
-- Name: idx_bundle_enrollments_bundle_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_bundle_enrollments_bundle_id ON public.bundle_enrollments USING btree (bundle_id);


--
-- TOC entry 4817 (class 1259 OID 52216)
-- Name: idx_bundle_enrollments_user_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_bundle_enrollments_user_id ON public.bundle_enrollments USING btree (user_id);


--
-- TOC entry 4822 (class 1259 OID 50410)
-- Name: idx_competencies_category; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_competencies_category ON public.competencies USING btree (category);


--
-- TOC entry 4823 (class 1259 OID 50411)
-- Name: idx_competencies_department_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_competencies_department_id ON public.competencies USING btree (department_id);


--
-- TOC entry 4832 (class 1259 OID 50412)
-- Name: idx_competency_history_changed_at; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_competency_history_changed_at ON public.competency_history USING btree (changed_at);


--
-- TOC entry 4833 (class 1259 OID 52314)
-- Name: idx_competency_history_user_competency; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_competency_history_user_competency ON public.competency_history USING btree (user_id, competency_id);


--
-- TOC entry 4838 (class 1259 OID 50414)
-- Name: idx_competency_role_mapping_competency; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_competency_role_mapping_competency ON public.competency_role_mapping USING btree (competency_id);


--
-- TOC entry 4839 (class 1259 OID 50415)
-- Name: idx_competency_role_mapping_role; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_competency_role_mapping_role ON public.competency_role_mapping USING btree (organizational_role_id);


--
-- TOC entry 4844 (class 1259 OID 52359)
-- Name: idx_competency_verifications_learner; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_competency_verifications_learner ON public.competency_verifications USING btree (learner_id);


--
-- TOC entry 4845 (class 1259 OID 50417)
-- Name: idx_competency_verifications_status; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_competency_verifications_status ON public.competency_verifications USING btree (status);


--
-- TOC entry 4846 (class 1259 OID 52378)
-- Name: idx_competency_verifications_verifier; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_competency_verifications_verifier ON public.competency_verifications USING btree (verifier_id);


--
-- TOC entry 4857 (class 1259 OID 50419)
-- Name: idx_course_bundles_is_active; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_course_bundles_is_active ON public.course_bundles USING btree (is_active);


--
-- TOC entry 4862 (class 1259 OID 50420)
-- Name: idx_course_competencies_job_family; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_course_competencies_job_family ON public.course_competencies USING btree (job_family_id);


--
-- TOC entry 4871 (class 1259 OID 50421)
-- Name: idx_course_waitlist_batch_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_course_waitlist_batch_id ON public.course_waitlist USING btree (batch_id);


--
-- TOC entry 4872 (class 1259 OID 50422)
-- Name: idx_course_waitlist_course_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_course_waitlist_course_id ON public.course_waitlist USING btree (course_id);


--
-- TOC entry 4873 (class 1259 OID 52507)
-- Name: idx_course_waitlist_learner_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_course_waitlist_learner_id ON public.course_waitlist USING btree (learner_id);


--
-- TOC entry 4874 (class 1259 OID 50424)
-- Name: idx_course_waitlist_status; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_course_waitlist_status ON public.course_waitlist USING btree (status);


--
-- TOC entry 4879 (class 1259 OID 50425)
-- Name: idx_courses_category; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_courses_category ON public.courses USING btree (category);


--
-- TOC entry 4880 (class 1259 OID 50426)
-- Name: idx_courses_subcategory; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_courses_subcategory ON public.courses USING btree (subcategory);


--
-- TOC entry 4881 (class 1259 OID 50427)
-- Name: idx_courses_tags; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_courses_tags ON public.courses USING gin (tags);


--
-- TOC entry 4886 (class 1259 OID 50428)
-- Name: idx_customer_batch_access_batch; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_batch_access_batch ON public.customer_batch_access USING btree (batch_id);


--
-- TOC entry 4887 (class 1259 OID 50429)
-- Name: idx_customer_batch_access_org; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_batch_access_org ON public.customer_batch_access USING btree (organization_id);


--
-- TOC entry 4892 (class 1259 OID 50430)
-- Name: idx_customer_batch_enrollments_batch; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_batch_enrollments_batch ON public.customer_batch_enrollments USING btree (batch_id);


--
-- TOC entry 4893 (class 1259 OID 50431)
-- Name: idx_customer_batch_enrollments_org; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_batch_enrollments_org ON public.customer_batch_enrollments USING btree (organization_id);


--
-- TOC entry 4894 (class 1259 OID 52611)
-- Name: idx_customer_batch_enrollments_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_batch_enrollments_user ON public.customer_batch_enrollments USING btree (user_id);


--
-- TOC entry 4899 (class 1259 OID 50433)
-- Name: idx_customer_course_access_course; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_course_access_course ON public.customer_course_access USING btree (course_id);


--
-- TOC entry 4900 (class 1259 OID 50434)
-- Name: idx_customer_course_access_org; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_course_access_org ON public.customer_course_access USING btree (organization_id);


--
-- TOC entry 4909 (class 1259 OID 50435)
-- Name: idx_customer_organizations_slug; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_organizations_slug ON public.customer_organizations USING btree (slug);


--
-- TOC entry 4918 (class 1259 OID 50436)
-- Name: idx_customer_portal_invitations_email; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_portal_invitations_email ON public.customer_portal_invitations USING btree (email);


--
-- TOC entry 4919 (class 1259 OID 50437)
-- Name: idx_customer_portal_invitations_org; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_portal_invitations_org ON public.customer_portal_invitations USING btree (organization_id);


--
-- TOC entry 4920 (class 1259 OID 50438)
-- Name: idx_customer_portal_invitations_status; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_customer_portal_invitations_status ON public.customer_portal_invitations USING btree (status);


--
-- TOC entry 4923 (class 1259 OID 50439)
-- Name: idx_dashboard_config_role; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_dashboard_config_role ON public.dashboard_configurations USING btree (role);


--
-- TOC entry 4924 (class 1259 OID 50440)
-- Name: idx_dashboard_config_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_dashboard_config_user ON public.dashboard_configurations USING btree (user_id);


--
-- TOC entry 4931 (class 1259 OID 52790)
-- Name: idx_data_export_requests_user_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_data_export_requests_user_id ON public.data_export_requests USING btree (user_id);


--
-- TOC entry 4940 (class 1259 OID 52817)
-- Name: idx_departments_head_user_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_departments_head_user_id ON public.departments USING btree (head_user_id);


--
-- TOC entry 4941 (class 1259 OID 50443)
-- Name: idx_departments_parent_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_departments_parent_id ON public.departments USING btree (parent_id);


--
-- TOC entry 4936 (class 1259 OID 50444)
-- Name: idx_dept_comp_levels_comp; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_dept_comp_levels_comp ON public.department_competency_levels USING btree (competency_id);


--
-- TOC entry 4937 (class 1259 OID 50445)
-- Name: idx_dept_comp_levels_dept; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_dept_comp_levels_dept ON public.department_competency_levels USING btree (department_id);


--
-- TOC entry 4950 (class 1259 OID 50446)
-- Name: idx_employee_assignments_department_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_employee_assignments_department_id ON public.employee_assignments USING btree (department_id);


--
-- TOC entry 4951 (class 1259 OID 50447)
-- Name: idx_employee_assignments_designation_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_employee_assignments_designation_id ON public.employee_assignments USING btree (designation_id);


--
-- TOC entry 4952 (class 1259 OID 52894)
-- Name: idx_employee_assignments_reports_to; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_employee_assignments_reports_to ON public.employee_assignments USING btree (reports_to_id);


--
-- TOC entry 4953 (class 1259 OID 52905)
-- Name: idx_employee_assignments_user_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_employee_assignments_user_id ON public.employee_assignments USING btree (user_id);


--
-- TOC entry 4956 (class 1259 OID 52928)
-- Name: idx_enrollment_requests_manager; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_enrollment_requests_manager ON public.enrollment_requests USING btree (manager_id);


--
-- TOC entry 4957 (class 1259 OID 50451)
-- Name: idx_enrollment_requests_status; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_enrollment_requests_status ON public.enrollment_requests USING btree (status);


--
-- TOC entry 4958 (class 1259 OID 52947)
-- Name: idx_enrollment_requests_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_enrollment_requests_user ON public.enrollment_requests USING btree (user_id);


--
-- TOC entry 4963 (class 1259 OID 50453)
-- Name: idx_enrollments_nominated_by; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_enrollments_nominated_by ON public.enrollments USING btree (nominated_by);


--
-- TOC entry 4966 (class 1259 OID 52991)
-- Name: idx_external_assessment_results_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_external_assessment_results_user ON public.external_assessment_results USING btree (user_id);


--
-- TOC entry 4973 (class 1259 OID 50455)
-- Name: idx_external_user_profiles_org; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_external_user_profiles_org ON public.external_user_profiles USING btree (organization_id);


--
-- TOC entry 4974 (class 1259 OID 50456)
-- Name: idx_external_user_profiles_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_external_user_profiles_user ON public.external_user_profiles USING btree (user_id);


--
-- TOC entry 4979 (class 1259 OID 50457)
-- Name: idx_feedback_questions_template; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_feedback_questions_template ON public.feedback_questions USING btree (template_id);


--
-- TOC entry 4982 (class 1259 OID 50458)
-- Name: idx_feedback_response_answers_response; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_feedback_response_answers_response ON public.feedback_response_answers USING btree (response_id);


--
-- TOC entry 4987 (class 1259 OID 50459)
-- Name: idx_feedback_responses_batch; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_feedback_responses_batch ON public.feedback_responses USING btree (batch_id);


--
-- TOC entry 4988 (class 1259 OID 50460)
-- Name: idx_feedback_responses_course; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_feedback_responses_course ON public.feedback_responses USING btree (course_id);


--
-- TOC entry 4989 (class 1259 OID 50461)
-- Name: idx_feedback_responses_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_feedback_responses_user ON public.feedback_responses USING btree (user_id);


--
-- TOC entry 4994 (class 1259 OID 50462)
-- Name: idx_feedback_triggers_template; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_feedback_triggers_template ON public.feedback_triggers USING btree (template_id);


--
-- TOC entry 5015 (class 1259 OID 50463)
-- Name: idx_hrms_sync_logs_created_at; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_hrms_sync_logs_created_at ON public.hrms_sync_logs USING btree (created_at DESC);


--
-- TOC entry 5016 (class 1259 OID 50464)
-- Name: idx_hrms_sync_logs_status; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_hrms_sync_logs_status ON public.hrms_sync_logs USING btree (status);


--
-- TOC entry 5021 (class 1259 OID 50465)
-- Name: idx_issued_certificates_is_revoked; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_issued_certificates_is_revoked ON public.issued_certificates USING btree (is_revoked);


--
-- TOC entry 5022 (class 1259 OID 50466)
-- Name: idx_issued_certificates_learner_name; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_issued_certificates_learner_name ON public.issued_certificates USING btree (learner_name);


--
-- TOC entry 5023 (class 1259 OID 53335)
-- Name: idx_issued_certificates_user_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_issued_certificates_user_id ON public.issued_certificates USING btree (user_id);


--
-- TOC entry 5024 (class 1259 OID 50468)
-- Name: idx_issued_certificates_verification_code; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_issued_certificates_verification_code ON public.issued_certificates USING btree (verification_code);


--
-- TOC entry 5035 (class 1259 OID 50469)
-- Name: idx_job_family_competencies_competency; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_job_family_competencies_competency ON public.job_family_competencies USING btree (competency_id);


--
-- TOC entry 5036 (class 1259 OID 50470)
-- Name: idx_job_family_competencies_family; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_job_family_competencies_family ON public.job_family_competencies USING btree (job_family_id);


--
-- TOC entry 5045 (class 1259 OID 50471)
-- Name: idx_landing_pages_is_homepage; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_landing_pages_is_homepage ON public.landing_pages USING btree (is_homepage) WHERE (is_homepage = true);


--
-- TOC entry 5046 (class 1259 OID 50472)
-- Name: idx_landing_pages_slug; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_landing_pages_slug ON public.landing_pages USING btree (slug);


--
-- TOC entry 5051 (class 1259 OID 50473)
-- Name: idx_learner_badges_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_learner_badges_user ON public.learner_badges USING btree (user_id);


--
-- TOC entry 5056 (class 1259 OID 50474)
-- Name: idx_learner_competency_progress_competency; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_learner_competency_progress_competency ON public.learner_competency_progress USING btree (competency_id);


--
-- TOC entry 5057 (class 1259 OID 50475)
-- Name: idx_learner_competency_progress_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_learner_competency_progress_user ON public.learner_competency_progress USING btree (user_id);


--
-- TOC entry 5081 (class 1259 OID 50476)
-- Name: idx_learner_points_total; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_learner_points_total ON public.learner_points USING btree (total_points DESC);


--
-- TOC entry 5086 (class 1259 OID 50477)
-- Name: idx_learning_activity_course; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_learning_activity_course ON public.learning_activity_log USING btree (course_id);


--
-- TOC entry 5087 (class 1259 OID 53649)
-- Name: idx_learning_activity_user_date; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_learning_activity_user_date ON public.learning_activity_log USING btree (user_id, activity_date);


--
-- TOC entry 5110 (class 1259 OID 50479)
-- Name: idx_microlearning_content_department; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_microlearning_content_department ON public.microlearning_content USING btree (department_id);


--
-- TOC entry 5119 (class 1259 OID 50480)
-- Name: idx_navigation_items_menu_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_navigation_items_menu_id ON public.navigation_items USING btree (menu_id);


--
-- TOC entry 5120 (class 1259 OID 50481)
-- Name: idx_navigation_items_parent_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_navigation_items_parent_id ON public.navigation_items USING btree (parent_id);


--
-- TOC entry 5078 (class 1259 OID 53598)
-- Name: idx_notifications_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_notifications_user ON public.learner_notifications USING btree (user_id, is_dismissed);


--
-- TOC entry 5131 (class 1259 OID 50483)
-- Name: idx_org_audit_changed_at; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_org_audit_changed_at ON public.org_structure_audit USING btree (changed_at DESC);


--
-- TOC entry 5132 (class 1259 OID 50484)
-- Name: idx_org_audit_entity; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_org_audit_entity ON public.org_structure_audit USING btree (entity_type, entity_id);


--
-- TOC entry 5135 (class 1259 OID 50485)
-- Name: idx_org_roles_department; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_org_roles_department ON public.organizational_roles USING btree (department_id);


--
-- TOC entry 5136 (class 1259 OID 50486)
-- Name: idx_organizational_roles_job_family; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_organizational_roles_job_family ON public.organizational_roles USING btree (job_family_id);


--
-- TOC entry 5139 (class 1259 OID 50487)
-- Name: idx_page_sections_order; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_page_sections_order ON public.page_sections USING btree (page_id, order_index);


--
-- TOC entry 5140 (class 1259 OID 50488)
-- Name: idx_page_sections_page_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_page_sections_page_id ON public.page_sections USING btree (page_id);


--
-- TOC entry 5149 (class 1259 OID 50489)
-- Name: idx_point_transactions_created; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_point_transactions_created ON public.point_transactions USING btree (created_at DESC);


--
-- TOC entry 5150 (class 1259 OID 50490)
-- Name: idx_point_transactions_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_point_transactions_user ON public.point_transactions USING btree (user_id);


--
-- TOC entry 5153 (class 1259 OID 50491)
-- Name: idx_poll_questions_poll; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_poll_questions_poll ON public.poll_questions USING btree (poll_id);


--
-- TOC entry 5156 (class 1259 OID 50492)
-- Name: idx_poll_responses_session; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_poll_responses_session ON public.poll_responses USING btree (session_id);


--
-- TOC entry 5165 (class 1259 OID 50493)
-- Name: idx_poll_sessions_poll; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_poll_sessions_poll ON public.poll_sessions USING btree (poll_id);


--
-- TOC entry 5166 (class 1259 OID 50494)
-- Name: idx_poll_sessions_status; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_poll_sessions_status ON public.poll_sessions USING btree (status);


--
-- TOC entry 5177 (class 1259 OID 50495)
-- Name: idx_profiles_org_role; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_profiles_org_role ON public.profiles USING btree (organizational_role_id);


--
-- TOC entry 5180 (class 1259 OID 50496)
-- Name: idx_question_analytics_question; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_question_analytics_question ON public.question_analytics USING btree (question_id);


--
-- TOC entry 5185 (class 1259 OID 50497)
-- Name: idx_question_bank_competency; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_question_bank_competency ON public.question_bank USING btree (competency_id);


--
-- TOC entry 5186 (class 1259 OID 50498)
-- Name: idx_question_bank_difficulty; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_question_bank_difficulty ON public.question_bank USING btree (difficulty);


--
-- TOC entry 5187 (class 1259 OID 50499)
-- Name: idx_question_bank_tags; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_question_bank_tags ON public.question_bank USING gin (tags);


--
-- TOC entry 5194 (class 1259 OID 50500)
-- Name: idx_scheduled_reassessments_date; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_scheduled_reassessments_date ON public.scheduled_reassessments USING btree (scheduled_date);


--
-- TOC entry 5195 (class 1259 OID 50501)
-- Name: idx_scheduled_reassessments_learner; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_scheduled_reassessments_learner ON public.scheduled_reassessments USING btree (learner_id);


--
-- TOC entry 5206 (class 1259 OID 50502)
-- Name: idx_session_reminders_schedule; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_session_reminders_schedule ON public.session_reminders USING btree (schedule_id);


--
-- TOC entry 5207 (class 1259 OID 50503)
-- Name: idx_session_reminders_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_session_reminders_user ON public.session_reminders USING btree (user_id);


--
-- TOC entry 5259 (class 1259 OID 50504)
-- Name: idx_xapi_statements_actor; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_xapi_statements_actor ON public.xapi_statements USING btree (actor_id);


--
-- TOC entry 5260 (class 1259 OID 50505)
-- Name: idx_xapi_statements_object; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_xapi_statements_object ON public.xapi_statements USING btree (object_type, object_id);


--
-- TOC entry 5261 (class 1259 OID 50506)
-- Name: idx_xapi_statements_verb; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_xapi_statements_verb ON public.xapi_statements USING btree (verb);


--
-- TOC entry 5228 (class 1259 OID 50507)
-- Name: trainers_user_id_unique; Type: INDEX; Schema: public; Owner: postgres
--

CREATE UNIQUE INDEX trainers_user_id_unique ON public.trainers USING btree (user_id) WHERE (user_id IS NOT NULL);


--
-- TOC entry 5508 (class 2620 OID 50508)
-- Name: departments audit_departments; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER audit_departments AFTER INSERT OR DELETE OR UPDATE ON public.departments FOR EACH ROW EXECUTE FUNCTION public.log_org_structure_change();


--
-- TOC entry 5509 (class 2620 OID 50509)
-- Name: designations audit_designations; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER audit_designations AFTER INSERT OR DELETE OR UPDATE ON public.designations FOR EACH ROW EXECUTE FUNCTION public.log_org_structure_change();


--
-- TOC entry 5510 (class 2620 OID 50510)
-- Name: employee_assignments audit_employee_assignments; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER audit_employee_assignments AFTER INSERT OR DELETE OR UPDATE ON public.employee_assignments FOR EACH ROW EXECUTE FUNCTION public.log_org_structure_change();


--
-- TOC entry 5488 (class 2620 OID 50511)
-- Name: assessment_assignments expand_assessment_assignment_trigger; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER expand_assessment_assignment_trigger AFTER INSERT ON public.assessment_assignments FOR EACH ROW EXECUTE FUNCTION public.expand_assessment_assignment();


--
-- TOC entry 5491 (class 2620 OID 50512)
-- Name: batches generate_batch_code_trigger; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER generate_batch_code_trigger BEFORE INSERT ON public.batches FOR EACH ROW WHEN ((new.batch_code IS NULL)) EXECUTE FUNCTION public.generate_batch_code();


--
-- TOC entry 5489 (class 2620 OID 50513)
-- Name: assessment_question_links increment_question_usage_trigger; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER increment_question_usage_trigger AFTER INSERT ON public.assessment_question_links FOR EACH ROW EXECUTE FUNCTION public.increment_question_usage();


--
-- TOC entry 5495 (class 2620 OID 50514)
-- Name: competency_assessment_attempts on_assessment_passed; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER on_assessment_passed AFTER INSERT OR UPDATE ON public.competency_assessment_attempts FOR EACH ROW EXECUTE FUNCTION public.update_competency_on_assessment_pass();


--
-- TOC entry 5520 (class 2620 OID 50515)
-- Name: learner_competency_progress on_competency_progress_change; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER on_competency_progress_change AFTER INSERT OR UPDATE ON public.learner_competency_progress FOR EACH ROW EXECUTE FUNCTION public.track_competency_history();


--
-- TOC entry 5512 (class 2620 OID 50516)
-- Name: enrollments on_course_completed; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER on_course_completed AFTER INSERT OR UPDATE ON public.enrollments FOR EACH ROW EXECUTE FUNCTION public.update_competency_on_course_completion();


--
-- TOC entry 5534 (class 2620 OID 50517)
-- Name: user_roles on_external_role_assigned; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER on_external_role_assigned AFTER INSERT OR UPDATE ON public.user_roles FOR EACH ROW EXECUTE FUNCTION public.create_external_user_profile();


--
-- TOC entry 5496 (class 2620 OID 50518)
-- Name: competency_assessment_attempts record_xapi_on_assessment_attempt; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER record_xapi_on_assessment_attempt AFTER INSERT OR UPDATE ON public.competency_assessment_attempts FOR EACH ROW EXECUTE FUNCTION public.record_xapi_statement();


--
-- TOC entry 5490 (class 2620 OID 50519)
-- Name: assignment_submissions submission_status_change_trigger; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER submission_status_change_trigger AFTER INSERT OR UPDATE ON public.assignment_submissions FOR EACH ROW EXECUTE FUNCTION public.log_submission_status_change();


--
-- TOC entry 5497 (class 2620 OID 50520)
-- Name: competency_assessment_attempts trigger_auto_assign_learning_path_on_failed_assessment; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_auto_assign_learning_path_on_failed_assessment AFTER INSERT OR UPDATE ON public.competency_assessment_attempts FOR EACH ROW EXECUTE FUNCTION public.auto_assign_learning_path_on_failed_assessment();


--
-- TOC entry 5521 (class 2620 OID 50521)
-- Name: learner_competency_progress trigger_auto_assign_learning_path_on_gap; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_auto_assign_learning_path_on_gap AFTER INSERT OR UPDATE ON public.learner_competency_progress FOR EACH ROW EXECUTE FUNCTION public.auto_assign_learning_path_on_gap();


--
-- TOC entry 5535 (class 2620 OID 50522)
-- Name: user_roles trigger_auto_enroll_learner_mandatory; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_auto_enroll_learner_mandatory AFTER INSERT ON public.user_roles FOR EACH ROW EXECUTE FUNCTION public.auto_enroll_learner_to_mandatory();


--
-- TOC entry 5502 (class 2620 OID 50523)
-- Name: courses trigger_auto_enroll_mandatory; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_auto_enroll_mandatory AFTER UPDATE ON public.courses FOR EACH ROW EXECUTE FUNCTION public.auto_enroll_mandatory_course();


--
-- TOC entry 5503 (class 2620 OID 50524)
-- Name: courses trigger_auto_enroll_new_mandatory; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_auto_enroll_new_mandatory AFTER INSERT ON public.courses FOR EACH ROW EXECUTE FUNCTION public.auto_enroll_new_mandatory_course();


--
-- TOC entry 5511 (class 2620 OID 50525)
-- Name: enrollment_requests trigger_enrollment_approval; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_enrollment_approval AFTER UPDATE ON public.enrollment_requests FOR EACH ROW EXECUTE FUNCTION public.process_enrollment_approval();


--
-- TOC entry 5522 (class 2620 OID 50526)
-- Name: learner_competency_progress trigger_gap_based_assignment; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_gap_based_assignment AFTER INSERT OR UPDATE ON public.learner_competency_progress FOR EACH ROW EXECUTE FUNCTION public.process_competency_gap_assignment();


--
-- TOC entry 5501 (class 2620 OID 50527)
-- Name: content_progress trigger_sync_enrollment_on_content_complete; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_sync_enrollment_on_content_complete AFTER INSERT OR UPDATE OF status ON public.content_progress FOR EACH ROW WHEN ((new.status = 'completed'::text)) EXECUTE FUNCTION public.sync_enrollment_progress();


--
-- TOC entry 5527 (class 2620 OID 50528)
-- Name: module_content trigger_sync_question_usage; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_sync_question_usage AFTER INSERT OR UPDATE OF content_data ON public.module_content FOR EACH ROW EXECUTE FUNCTION public.sync_question_usage_on_content_change();


--
-- TOC entry 5498 (class 2620 OID 50529)
-- Name: competency_assessment_attempts trigger_update_competency_score; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_update_competency_score AFTER INSERT OR UPDATE ON public.competency_assessment_attempts FOR EACH ROW EXECUTE FUNCTION public.update_learner_competency_score();


--
-- TOC entry 5492 (class 2620 OID 50530)
-- Name: branding_settings update_branding_settings_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_branding_settings_updated_at BEFORE UPDATE ON public.branding_settings FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5493 (class 2620 OID 50531)
-- Name: certificate_templates update_certificate_templates_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_certificate_templates_updated_at BEFORE UPDATE ON public.certificate_templates FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5500 (class 2620 OID 50532)
-- Name: competency_role_mapping update_competency_role_mapping_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_competency_role_mapping_updated_at BEFORE UPDATE ON public.competency_role_mapping FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5504 (class 2620 OID 50533)
-- Name: courses update_courses_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_courses_updated_at BEFORE UPDATE ON public.courses FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5505 (class 2620 OID 50534)
-- Name: customer_organizations update_customer_organizations_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_customer_organizations_updated_at BEFORE UPDATE ON public.customer_organizations FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5506 (class 2620 OID 50535)
-- Name: dashboard_configurations update_dashboard_configurations_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_dashboard_configurations_updated_at BEFORE UPDATE ON public.dashboard_configurations FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5507 (class 2620 OID 50536)
-- Name: department_competency_levels update_department_competency_levels_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_department_competency_levels_updated_at BEFORE UPDATE ON public.department_competency_levels FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5513 (class 2620 OID 50537)
-- Name: external_user_profiles update_external_user_profiles_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_external_user_profiles_updated_at BEFORE UPDATE ON public.external_user_profiles FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5514 (class 2620 OID 50538)
-- Name: help_articles update_help_articles_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_help_articles_updated_at BEFORE UPDATE ON public.help_articles FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5515 (class 2620 OID 50539)
-- Name: help_categories update_help_categories_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_help_categories_updated_at BEFORE UPDATE ON public.help_categories FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5516 (class 2620 OID 50540)
-- Name: hrms_configurations update_hrms_configurations_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_hrms_configurations_updated_at BEFORE UPDATE ON public.hrms_configurations FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5517 (class 2620 OID 50541)
-- Name: job_families update_job_families_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_job_families_updated_at BEFORE UPDATE ON public.job_families FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5518 (class 2620 OID 50542)
-- Name: kpi_definitions update_kpi_definitions_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_kpi_definitions_updated_at BEFORE UPDATE ON public.kpi_definitions FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5519 (class 2620 OID 50543)
-- Name: landing_pages update_landing_pages_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_landing_pages_updated_at BEFORE UPDATE ON public.landing_pages FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5523 (class 2620 OID 50544)
-- Name: learner_competency_progress update_learner_competency_progress_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_learner_competency_progress_updated_at BEFORE UPDATE ON public.learner_competency_progress FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5524 (class 2620 OID 50545)
-- Name: learner_notes update_learner_notes_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_learner_notes_updated_at BEFORE UPDATE ON public.learner_notes FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5525 (class 2620 OID 50546)
-- Name: meeting_integrations update_meeting_integrations_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_meeting_integrations_updated_at BEFORE UPDATE ON public.meeting_integrations FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5526 (class 2620 OID 50547)
-- Name: microlearning_content update_microlearning_content_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_microlearning_content_updated_at BEFORE UPDATE ON public.microlearning_content FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5528 (class 2620 OID 50548)
-- Name: navigation_menus update_navigation_menus_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_navigation_menus_updated_at BEFORE UPDATE ON public.navigation_menus FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5529 (class 2620 OID 50549)
-- Name: page_sections update_page_sections_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_page_sections_updated_at BEFORE UPDATE ON public.page_sections FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5530 (class 2620 OID 50550)
-- Name: poll_responses update_poll_results_on_response; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_poll_results_on_response AFTER INSERT OR UPDATE ON public.poll_responses FOR EACH ROW EXECUTE FUNCTION public.update_poll_results_cache();


--
-- TOC entry 5531 (class 2620 OID 50551)
-- Name: profiles update_profiles_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_profiles_updated_at BEFORE UPDATE ON public.profiles FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5499 (class 2620 OID 50552)
-- Name: competency_assessment_attempts update_question_analytics_trigger; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_question_analytics_trigger AFTER INSERT ON public.competency_assessment_attempts FOR EACH ROW WHEN ((new.completed_at IS NOT NULL)) EXECUTE FUNCTION public.update_question_analytics();


--
-- TOC entry 5532 (class 2620 OID 50553)
-- Name: trainer_feedback_responses update_trainer_rating_trigger; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_trainer_rating_trigger AFTER INSERT OR UPDATE ON public.trainer_feedback_responses FOR EACH ROW EXECUTE FUNCTION public.update_trainer_rating();


--
-- TOC entry 5533 (class 2620 OID 50554)
-- Name: trainers update_trainers_updated_at; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER update_trainers_updated_at BEFORE UPDATE ON public.trainers FOR EACH ROW EXECUTE FUNCTION public.update_updated_at_column();


--
-- TOC entry 5494 (class 2620 OID 50555)
-- Name: competencies version_competency_trigger; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER version_competency_trigger AFTER UPDATE ON public.competencies FOR EACH ROW EXECUTE FUNCTION public.version_competency_on_change();


--
-- TOC entry 5266 (class 2606 OID 50556)
-- Name: ai_content_tags ai_content_tags_tag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.ai_content_tags
    ADD CONSTRAINT ai_content_tags_tag_id_fkey FOREIGN KEY (tag_id) REFERENCES public.tag_taxonomy(id);


--
-- TOC entry 5267 (class 2606 OID 50561)
-- Name: assessment_assignment_learners assessment_assignment_learners_assignment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_assignment_learners
    ADD CONSTRAINT assessment_assignment_learners_assignment_id_fkey FOREIGN KEY (assignment_id) REFERENCES public.assessment_assignments(id) ON DELETE CASCADE;


--
-- TOC entry 5268 (class 2606 OID 50566)
-- Name: assessment_assignments assessment_assignments_assessment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_assignments
    ADD CONSTRAINT assessment_assignments_assessment_id_fkey FOREIGN KEY (assessment_id) REFERENCES public.competency_assessments(id) ON DELETE CASCADE;


--
-- TOC entry 5269 (class 2606 OID 50571)
-- Name: assessment_assignments assessment_assignments_assigned_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_assignments
    ADD CONSTRAINT assessment_assignments_assigned_by_fkey FOREIGN KEY (assigned_by) REFERENCES public.users(id);


--
-- TOC entry 5270 (class 2606 OID 50576)
-- Name: assessment_calibration assessment_calibration_assessment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_calibration
    ADD CONSTRAINT assessment_calibration_assessment_id_fkey FOREIGN KEY (assessment_id) REFERENCES public.competency_assessments(id) ON DELETE CASCADE;


--
-- TOC entry 5271 (class 2606 OID 50581)
-- Name: assessment_question_links assessment_question_links_assessment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_question_links
    ADD CONSTRAINT assessment_question_links_assessment_id_fkey FOREIGN KEY (assessment_id) REFERENCES public.competency_assessments(id) ON DELETE CASCADE;


--
-- TOC entry 5272 (class 2606 OID 50586)
-- Name: assessment_question_links assessment_question_links_inline_question_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_question_links
    ADD CONSTRAINT assessment_question_links_inline_question_id_fkey FOREIGN KEY (inline_question_id) REFERENCES public.competency_assessment_questions(id) ON DELETE CASCADE;


--
-- TOC entry 5273 (class 2606 OID 50591)
-- Name: assessment_question_links assessment_question_links_question_bank_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assessment_question_links
    ADD CONSTRAINT assessment_question_links_question_bank_id_fkey FOREIGN KEY (question_bank_id) REFERENCES public.question_bank(id) ON DELETE CASCADE;


--
-- TOC entry 5274 (class 2606 OID 50596)
-- Name: assignment_group_members assignment_group_members_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_group_members
    ADD CONSTRAINT assignment_group_members_group_id_fkey FOREIGN KEY (group_id) REFERENCES public.assignment_groups(id) ON DELETE CASCADE;


--
-- TOC entry 5275 (class 2606 OID 50601)
-- Name: assignment_groups assignment_groups_assignment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_groups
    ADD CONSTRAINT assignment_groups_assignment_id_fkey FOREIGN KEY (assignment_id) REFERENCES public.batch_assignments(id) ON DELETE CASCADE;


--
-- TOC entry 5276 (class 2606 OID 50606)
-- Name: assignment_learners assignment_learners_assignment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_learners
    ADD CONSTRAINT assignment_learners_assignment_id_fkey FOREIGN KEY (assignment_id) REFERENCES public.batch_assignments(id) ON DELETE CASCADE;


--
-- TOC entry 5277 (class 2606 OID 50611)
-- Name: assignment_submission_history assignment_submission_history_submission_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_submission_history
    ADD CONSTRAINT assignment_submission_history_submission_id_fkey FOREIGN KEY (submission_id) REFERENCES public.assignment_submissions(id) ON DELETE CASCADE;


--
-- TOC entry 5278 (class 2606 OID 50616)
-- Name: assignment_submissions assignment_submissions_assignment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_submissions
    ADD CONSTRAINT assignment_submissions_assignment_id_fkey FOREIGN KEY (assignment_id) REFERENCES public.assignments(id) ON DELETE CASCADE;


--
-- TOC entry 5279 (class 2606 OID 50621)
-- Name: assignment_submissions assignment_submissions_batch_assignment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_submissions
    ADD CONSTRAINT assignment_submissions_batch_assignment_id_fkey FOREIGN KEY (batch_assignment_id) REFERENCES public.batch_assignments(id);


--
-- TOC entry 5280 (class 2606 OID 50626)
-- Name: assignment_submissions assignment_submissions_graded_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_submissions
    ADD CONSTRAINT assignment_submissions_graded_by_fkey FOREIGN KEY (graded_by) REFERENCES public.users(id);


--
-- TOC entry 5281 (class 2606 OID 50631)
-- Name: assignment_submissions assignment_submissions_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_submissions
    ADD CONSTRAINT assignment_submissions_group_id_fkey FOREIGN KEY (group_id) REFERENCES public.assignment_groups(id) ON DELETE SET NULL;


--
-- TOC entry 5282 (class 2606 OID 50636)
-- Name: assignment_submissions assignment_submissions_student_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignment_submissions
    ADD CONSTRAINT assignment_submissions_student_id_fkey FOREIGN KEY (student_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5283 (class 2606 OID 50641)
-- Name: assignments assignments_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignments
    ADD CONSTRAINT assignments_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5284 (class 2606 OID 50646)
-- Name: assignments assignments_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.assignments
    ADD CONSTRAINT assignments_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5285 (class 2606 OID 50651)
-- Name: attendance attendance_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.attendance
    ADD CONSTRAINT attendance_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5286 (class 2606 OID 50656)
-- Name: attendance attendance_marked_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.attendance
    ADD CONSTRAINT attendance_marked_by_fkey FOREIGN KEY (marked_by) REFERENCES public.users(id);


--
-- TOC entry 5287 (class 2606 OID 50661)
-- Name: attendance attendance_student_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.attendance
    ADD CONSTRAINT attendance_student_id_fkey FOREIGN KEY (student_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5288 (class 2606 OID 50666)
-- Name: badge_definitions badge_definitions_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.badge_definitions
    ADD CONSTRAINT badge_definitions_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5289 (class 2606 OID 50671)
-- Name: batch_assignments batch_assignments_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_assignments
    ADD CONSTRAINT batch_assignments_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5290 (class 2606 OID 50676)
-- Name: batch_assignments batch_assignments_module_content_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_assignments
    ADD CONSTRAINT batch_assignments_module_content_id_fkey FOREIGN KEY (module_content_id) REFERENCES public.module_content(id) ON DELETE SET NULL;


--
-- TOC entry 5291 (class 2606 OID 50681)
-- Name: batch_lesson_plans batch_lesson_plans_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_lesson_plans
    ADD CONSTRAINT batch_lesson_plans_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5292 (class 2606 OID 50686)
-- Name: batch_lesson_plans batch_lesson_plans_module_content_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_lesson_plans
    ADD CONSTRAINT batch_lesson_plans_module_content_id_fkey FOREIGN KEY (module_content_id) REFERENCES public.module_content(id) ON DELETE SET NULL;


--
-- TOC entry 5293 (class 2606 OID 50691)
-- Name: batch_mentors batch_mentors_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_mentors
    ADD CONSTRAINT batch_mentors_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5294 (class 2606 OID 50696)
-- Name: batch_schedule batch_schedule_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_schedule
    ADD CONSTRAINT batch_schedule_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5295 (class 2606 OID 50701)
-- Name: batch_schedule batch_schedule_meeting_integration_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_schedule
    ADD CONSTRAINT batch_schedule_meeting_integration_id_fkey FOREIGN KEY (meeting_integration_id) REFERENCES public.meeting_integrations(id);


--
-- TOC entry 5296 (class 2606 OID 50706)
-- Name: batch_students batch_students_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_students
    ADD CONSTRAINT batch_students_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5297 (class 2606 OID 50711)
-- Name: batch_students batch_students_student_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_students
    ADD CONSTRAINT batch_students_student_id_fkey FOREIGN KEY (student_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5298 (class 2606 OID 50716)
-- Name: batch_trainers batch_trainers_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_trainers
    ADD CONSTRAINT batch_trainers_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5299 (class 2606 OID 50721)
-- Name: batch_trainers batch_trainers_trainer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batch_trainers
    ADD CONSTRAINT batch_trainers_trainer_id_fkey FOREIGN KEY (trainer_id) REFERENCES public.trainers(id) ON DELETE CASCADE;


--
-- TOC entry 5300 (class 2606 OID 50726)
-- Name: batches batches_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batches
    ADD CONSTRAINT batches_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE SET NULL;


--
-- TOC entry 5301 (class 2606 OID 50731)
-- Name: batches batches_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batches
    ADD CONSTRAINT batches_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5302 (class 2606 OID 50736)
-- Name: batches batches_trainer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.batches
    ADD CONSTRAINT batches_trainer_id_fkey FOREIGN KEY (trainer_id) REFERENCES public.users(id);


--
-- TOC entry 5303 (class 2606 OID 50741)
-- Name: breakout_room_participants breakout_room_participants_room_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.breakout_room_participants
    ADD CONSTRAINT breakout_room_participants_room_id_fkey FOREIGN KEY (room_id) REFERENCES public.breakout_rooms(id) ON DELETE CASCADE;


--
-- TOC entry 5304 (class 2606 OID 50746)
-- Name: breakout_rooms breakout_rooms_session_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.breakout_rooms
    ADD CONSTRAINT breakout_rooms_session_id_fkey FOREIGN KEY (session_id) REFERENCES public.batch_schedule(id) ON DELETE CASCADE;


--
-- TOC entry 5305 (class 2606 OID 50751)
-- Name: bundle_courses bundle_courses_bundle_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bundle_courses
    ADD CONSTRAINT bundle_courses_bundle_id_fkey FOREIGN KEY (bundle_id) REFERENCES public.course_bundles(id) ON DELETE CASCADE;


--
-- TOC entry 5306 (class 2606 OID 50756)
-- Name: bundle_courses bundle_courses_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bundle_courses
    ADD CONSTRAINT bundle_courses_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5307 (class 2606 OID 50761)
-- Name: bundle_enrollments bundle_enrollments_bundle_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bundle_enrollments
    ADD CONSTRAINT bundle_enrollments_bundle_id_fkey FOREIGN KEY (bundle_id) REFERENCES public.course_bundles(id) ON DELETE CASCADE;


--
-- TOC entry 5308 (class 2606 OID 50766)
-- Name: competencies competencies_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competencies
    ADD CONSTRAINT competencies_department_id_fkey FOREIGN KEY (department_id) REFERENCES public.departments(id) ON DELETE SET NULL;


--
-- TOC entry 5309 (class 2606 OID 50771)
-- Name: competencies competencies_proficiency_scale_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competencies
    ADD CONSTRAINT competencies_proficiency_scale_id_fkey FOREIGN KEY (proficiency_scale_id) REFERENCES public.proficiency_scales(id);


--
-- TOC entry 5310 (class 2606 OID 50776)
-- Name: competency_assessment_attempts competency_assessment_attempts_assessment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_assessment_attempts
    ADD CONSTRAINT competency_assessment_attempts_assessment_id_fkey FOREIGN KEY (assessment_id) REFERENCES public.competency_assessments(id) ON DELETE CASCADE;


--
-- TOC entry 5311 (class 2606 OID 50781)
-- Name: competency_assessment_questions competency_assessment_questions_assessment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_assessment_questions
    ADD CONSTRAINT competency_assessment_questions_assessment_id_fkey FOREIGN KEY (assessment_id) REFERENCES public.competency_assessments(id) ON DELETE CASCADE;


--
-- TOC entry 5312 (class 2606 OID 50786)
-- Name: competency_assessments competency_assessments_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_assessments
    ADD CONSTRAINT competency_assessments_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5313 (class 2606 OID 50791)
-- Name: competency_history competency_history_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_history
    ADD CONSTRAINT competency_history_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5314 (class 2606 OID 50796)
-- Name: competency_role_mapping competency_role_mapping_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_role_mapping
    ADD CONSTRAINT competency_role_mapping_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5315 (class 2606 OID 50801)
-- Name: competency_role_mapping competency_role_mapping_organizational_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_role_mapping
    ADD CONSTRAINT competency_role_mapping_organizational_role_id_fkey FOREIGN KEY (organizational_role_id) REFERENCES public.organizational_roles(id) ON DELETE CASCADE;


--
-- TOC entry 5316 (class 2606 OID 50806)
-- Name: competency_validity_rules competency_validity_rules_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_validity_rules
    ADD CONSTRAINT competency_validity_rules_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5317 (class 2606 OID 50811)
-- Name: competency_validity_rules competency_validity_rules_job_family_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_validity_rules
    ADD CONSTRAINT competency_validity_rules_job_family_id_fkey FOREIGN KEY (job_family_id) REFERENCES public.job_families(id) ON DELETE CASCADE;


--
-- TOC entry 5318 (class 2606 OID 50816)
-- Name: competency_verifications competency_verifications_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_verifications
    ADD CONSTRAINT competency_verifications_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5319 (class 2606 OID 50821)
-- Name: competency_versions competency_versions_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.competency_versions
    ADD CONSTRAINT competency_versions_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5320 (class 2606 OID 50826)
-- Name: content_progress content_progress_content_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.content_progress
    ADD CONSTRAINT content_progress_content_id_fkey FOREIGN KEY (content_id) REFERENCES public.module_content(id) ON DELETE CASCADE;


--
-- TOC entry 5321 (class 2606 OID 50831)
-- Name: content_progress content_progress_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.content_progress
    ADD CONSTRAINT content_progress_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5322 (class 2606 OID 50836)
-- Name: course_bundles course_bundles_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_bundles
    ADD CONSTRAINT course_bundles_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5323 (class 2606 OID 50841)
-- Name: course_competencies course_competencies_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_competencies
    ADD CONSTRAINT course_competencies_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5324 (class 2606 OID 50846)
-- Name: course_competencies course_competencies_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_competencies
    ADD CONSTRAINT course_competencies_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5325 (class 2606 OID 50851)
-- Name: course_competencies course_competencies_job_family_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_competencies
    ADD CONSTRAINT course_competencies_job_family_id_fkey FOREIGN KEY (job_family_id) REFERENCES public.job_families(id) ON DELETE SET NULL;


--
-- TOC entry 5326 (class 2606 OID 50856)
-- Name: course_modules course_modules_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_modules
    ADD CONSTRAINT course_modules_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5327 (class 2606 OID 50861)
-- Name: course_trainers course_trainers_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_trainers
    ADD CONSTRAINT course_trainers_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5328 (class 2606 OID 50866)
-- Name: course_trainers course_trainers_module_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_trainers
    ADD CONSTRAINT course_trainers_module_id_fkey FOREIGN KEY (module_id) REFERENCES public.course_modules(id) ON DELETE CASCADE;


--
-- TOC entry 5329 (class 2606 OID 50871)
-- Name: course_trainers course_trainers_trainer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_trainers
    ADD CONSTRAINT course_trainers_trainer_id_fkey FOREIGN KEY (trainer_id) REFERENCES public.trainers(id) ON DELETE CASCADE;


--
-- TOC entry 5330 (class 2606 OID 50876)
-- Name: course_waitlist course_waitlist_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_waitlist
    ADD CONSTRAINT course_waitlist_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5331 (class 2606 OID 50881)
-- Name: course_waitlist course_waitlist_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_waitlist
    ADD CONSTRAINT course_waitlist_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5332 (class 2606 OID 50886)
-- Name: courses courses_certificate_template_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.courses
    ADD CONSTRAINT courses_certificate_template_id_fkey FOREIGN KEY (certificate_template_id) REFERENCES public.certificate_templates(id);


--
-- TOC entry 5333 (class 2606 OID 50891)
-- Name: courses courses_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.courses
    ADD CONSTRAINT courses_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5334 (class 2606 OID 50896)
-- Name: customer_batch_access customer_batch_access_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_batch_access
    ADD CONSTRAINT customer_batch_access_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5335 (class 2606 OID 50901)
-- Name: customer_batch_access customer_batch_access_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_batch_access
    ADD CONSTRAINT customer_batch_access_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES public.customer_organizations(id) ON DELETE CASCADE;


--
-- TOC entry 5336 (class 2606 OID 50906)
-- Name: customer_batch_enrollments customer_batch_enrollments_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_batch_enrollments
    ADD CONSTRAINT customer_batch_enrollments_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5337 (class 2606 OID 50911)
-- Name: customer_batch_enrollments customer_batch_enrollments_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_batch_enrollments
    ADD CONSTRAINT customer_batch_enrollments_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES public.customer_organizations(id) ON DELETE CASCADE;


--
-- TOC entry 5338 (class 2606 OID 50916)
-- Name: customer_course_access customer_course_access_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_course_access
    ADD CONSTRAINT customer_course_access_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5339 (class 2606 OID 50921)
-- Name: customer_course_access customer_course_access_granted_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_course_access
    ADD CONSTRAINT customer_course_access_granted_by_fkey FOREIGN KEY (granted_by) REFERENCES public.users(id);


--
-- TOC entry 5340 (class 2606 OID 50926)
-- Name: customer_course_access customer_course_access_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_course_access
    ADD CONSTRAINT customer_course_access_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES public.customer_organizations(id) ON DELETE CASCADE;


--
-- TOC entry 5341 (class 2606 OID 50931)
-- Name: customer_enrollments customer_enrollments_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_enrollments
    ADD CONSTRAINT customer_enrollments_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5342 (class 2606 OID 50936)
-- Name: customer_enrollments customer_enrollments_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_enrollments
    ADD CONSTRAINT customer_enrollments_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES public.customer_organizations(id) ON DELETE CASCADE;


--
-- TOC entry 5343 (class 2606 OID 50941)
-- Name: customer_organizations customer_organizations_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_organizations
    ADD CONSTRAINT customer_organizations_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5344 (class 2606 OID 50946)
-- Name: customer_portal_admins customer_portal_admins_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_portal_admins
    ADD CONSTRAINT customer_portal_admins_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES public.customer_organizations(id) ON DELETE CASCADE;


--
-- TOC entry 5345 (class 2606 OID 50951)
-- Name: customer_portal_invitations customer_portal_invitations_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customer_portal_invitations
    ADD CONSTRAINT customer_portal_invitations_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES public.customer_organizations(id) ON DELETE CASCADE;


--
-- TOC entry 5346 (class 2606 OID 50956)
-- Name: dashboard_configurations dashboard_configurations_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.dashboard_configurations
    ADD CONSTRAINT dashboard_configurations_department_id_fkey FOREIGN KEY (department_id) REFERENCES public.departments(id) ON DELETE SET NULL;


--
-- TOC entry 5347 (class 2606 OID 50961)
-- Name: dashboard_configurations dashboard_configurations_kpi_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.dashboard_configurations
    ADD CONSTRAINT dashboard_configurations_kpi_id_fkey FOREIGN KEY (kpi_id) REFERENCES public.kpi_definitions(id) ON DELETE CASCADE;


--
-- TOC entry 5348 (class 2606 OID 50966)
-- Name: dashboard_configurations dashboard_configurations_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.dashboard_configurations
    ADD CONSTRAINT dashboard_configurations_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5349 (class 2606 OID 50971)
-- Name: dashboard_templates dashboard_templates_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.dashboard_templates
    ADD CONSTRAINT dashboard_templates_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5350 (class 2606 OID 50976)
-- Name: department_competency_levels department_competency_levels_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.department_competency_levels
    ADD CONSTRAINT department_competency_levels_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5351 (class 2606 OID 50981)
-- Name: department_competency_levels department_competency_levels_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.department_competency_levels
    ADD CONSTRAINT department_competency_levels_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5352 (class 2606 OID 50986)
-- Name: department_competency_levels department_competency_levels_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.department_competency_levels
    ADD CONSTRAINT department_competency_levels_department_id_fkey FOREIGN KEY (department_id) REFERENCES public.departments(id) ON DELETE CASCADE;


--
-- TOC entry 5353 (class 2606 OID 50991)
-- Name: departments departments_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.departments
    ADD CONSTRAINT departments_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.departments(id) ON DELETE SET NULL;


--
-- TOC entry 5354 (class 2606 OID 50996)
-- Name: designation_competencies designation_competencies_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.designation_competencies
    ADD CONSTRAINT designation_competencies_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5355 (class 2606 OID 51001)
-- Name: designation_competencies designation_competencies_designation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.designation_competencies
    ADD CONSTRAINT designation_competencies_designation_id_fkey FOREIGN KEY (designation_id) REFERENCES public.designations(id) ON DELETE CASCADE;


--
-- TOC entry 5356 (class 2606 OID 51006)
-- Name: designations designations_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.designations
    ADD CONSTRAINT designations_department_id_fkey FOREIGN KEY (department_id) REFERENCES public.departments(id) ON DELETE SET NULL;


--
-- TOC entry 5357 (class 2606 OID 51011)
-- Name: employee_assignments employee_assignments_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.employee_assignments
    ADD CONSTRAINT employee_assignments_department_id_fkey FOREIGN KEY (department_id) REFERENCES public.departments(id) ON DELETE SET NULL;


--
-- TOC entry 5358 (class 2606 OID 51016)
-- Name: employee_assignments employee_assignments_designation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.employee_assignments
    ADD CONSTRAINT employee_assignments_designation_id_fkey FOREIGN KEY (designation_id) REFERENCES public.designations(id) ON DELETE SET NULL;


--
-- TOC entry 5359 (class 2606 OID 51021)
-- Name: enrollment_requests enrollment_requests_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.enrollment_requests
    ADD CONSTRAINT enrollment_requests_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5360 (class 2606 OID 51026)
-- Name: enrollments enrollments_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.enrollments
    ADD CONSTRAINT enrollments_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE SET NULL;


--
-- TOC entry 5361 (class 2606 OID 51031)
-- Name: enrollments enrollments_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.enrollments
    ADD CONSTRAINT enrollments_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5362 (class 2606 OID 51036)
-- Name: enrollments enrollments_nominated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.enrollments
    ADD CONSTRAINT enrollments_nominated_by_fkey FOREIGN KEY (nominated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- TOC entry 5363 (class 2606 OID 51041)
-- Name: enrollments enrollments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.enrollments
    ADD CONSTRAINT enrollments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5364 (class 2606 OID 51046)
-- Name: external_assessment_results external_assessment_results_external_assessment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.external_assessment_results
    ADD CONSTRAINT external_assessment_results_external_assessment_id_fkey FOREIGN KEY (external_assessment_id) REFERENCES public.external_assessments(id) ON DELETE CASCADE;


--
-- TOC entry 5365 (class 2606 OID 51051)
-- Name: external_assessments external_assessments_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.external_assessments
    ADD CONSTRAINT external_assessments_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE SET NULL;


--
-- TOC entry 5366 (class 2606 OID 51056)
-- Name: external_user_profiles external_user_profiles_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.external_user_profiles
    ADD CONSTRAINT external_user_profiles_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES public.customer_organizations(id);


--
-- TOC entry 5367 (class 2606 OID 51061)
-- Name: external_user_profiles external_user_profiles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.external_user_profiles
    ADD CONSTRAINT external_user_profiles_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5368 (class 2606 OID 51066)
-- Name: feedback_analytics feedback_analytics_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_analytics
    ADD CONSTRAINT feedback_analytics_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id);


--
-- TOC entry 5369 (class 2606 OID 51071)
-- Name: feedback_analytics feedback_analytics_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_analytics
    ADD CONSTRAINT feedback_analytics_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id);


--
-- TOC entry 5370 (class 2606 OID 51076)
-- Name: feedback_analytics feedback_analytics_question_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_analytics
    ADD CONSTRAINT feedback_analytics_question_id_fkey FOREIGN KEY (question_id) REFERENCES public.feedback_questions(id);


--
-- TOC entry 5371 (class 2606 OID 51081)
-- Name: feedback_analytics feedback_analytics_template_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_analytics
    ADD CONSTRAINT feedback_analytics_template_id_fkey FOREIGN KEY (template_id) REFERENCES public.feedback_templates(id);


--
-- TOC entry 5372 (class 2606 OID 51086)
-- Name: feedback_questions feedback_questions_template_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_questions
    ADD CONSTRAINT feedback_questions_template_id_fkey FOREIGN KEY (template_id) REFERENCES public.feedback_templates(id) ON DELETE CASCADE;


--
-- TOC entry 5373 (class 2606 OID 51091)
-- Name: feedback_response_answers feedback_response_answers_question_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_response_answers
    ADD CONSTRAINT feedback_response_answers_question_id_fkey FOREIGN KEY (question_id) REFERENCES public.feedback_questions(id);


--
-- TOC entry 5374 (class 2606 OID 51096)
-- Name: feedback_response_answers feedback_response_answers_response_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_response_answers
    ADD CONSTRAINT feedback_response_answers_response_id_fkey FOREIGN KEY (response_id) REFERENCES public.feedback_responses(id) ON DELETE CASCADE;


--
-- TOC entry 5375 (class 2606 OID 51101)
-- Name: feedback_responses feedback_responses_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_responses
    ADD CONSTRAINT feedback_responses_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id);


--
-- TOC entry 5376 (class 2606 OID 51106)
-- Name: feedback_responses feedback_responses_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_responses
    ADD CONSTRAINT feedback_responses_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id);


--
-- TOC entry 5377 (class 2606 OID 51111)
-- Name: feedback_responses feedback_responses_module_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_responses
    ADD CONSTRAINT feedback_responses_module_id_fkey FOREIGN KEY (module_id) REFERENCES public.course_modules(id);


--
-- TOC entry 5378 (class 2606 OID 51116)
-- Name: feedback_responses feedback_responses_session_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_responses
    ADD CONSTRAINT feedback_responses_session_id_fkey FOREIGN KEY (session_id) REFERENCES public.batch_schedule(id);


--
-- TOC entry 5379 (class 2606 OID 51121)
-- Name: feedback_responses feedback_responses_template_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_responses
    ADD CONSTRAINT feedback_responses_template_id_fkey FOREIGN KEY (template_id) REFERENCES public.feedback_templates(id);


--
-- TOC entry 5380 (class 2606 OID 51126)
-- Name: feedback_responses feedback_responses_trigger_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_responses
    ADD CONSTRAINT feedback_responses_trigger_id_fkey FOREIGN KEY (trigger_id) REFERENCES public.feedback_triggers(id);


--
-- TOC entry 5381 (class 2606 OID 51131)
-- Name: feedback_responses feedback_responses_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_responses
    ADD CONSTRAINT feedback_responses_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- TOC entry 5382 (class 2606 OID 51136)
-- Name: feedback_templates feedback_templates_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_templates
    ADD CONSTRAINT feedback_templates_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5383 (class 2606 OID 51141)
-- Name: feedback_triggers feedback_triggers_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_triggers
    ADD CONSTRAINT feedback_triggers_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5384 (class 2606 OID 51146)
-- Name: feedback_triggers feedback_triggers_template_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.feedback_triggers
    ADD CONSTRAINT feedback_triggers_template_id_fkey FOREIGN KEY (template_id) REFERENCES public.feedback_templates(id) ON DELETE CASCADE;


--
-- TOC entry 5458 (class 2606 OID 51151)
-- Name: profiles fk_profiles_department; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.profiles
    ADD CONSTRAINT fk_profiles_department FOREIGN KEY (department_id) REFERENCES public.departments(id) ON DELETE SET NULL;


--
-- TOC entry 5486 (class 2606 OID 51156)
-- Name: user_roles fk_user_roles_department; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_roles
    ADD CONSTRAINT fk_user_roles_department FOREIGN KEY (department_id) REFERENCES public.departments(id) ON DELETE SET NULL;


--
-- TOC entry 5385 (class 2606 OID 51161)
-- Name: help_article_media help_article_media_article_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_article_media
    ADD CONSTRAINT help_article_media_article_id_fkey FOREIGN KEY (article_id) REFERENCES public.help_articles(id) ON DELETE CASCADE;


--
-- TOC entry 5386 (class 2606 OID 51166)
-- Name: help_article_sections help_article_sections_article_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_article_sections
    ADD CONSTRAINT help_article_sections_article_id_fkey FOREIGN KEY (article_id) REFERENCES public.help_articles(id) ON DELETE CASCADE;


--
-- TOC entry 5387 (class 2606 OID 51171)
-- Name: help_article_steps help_article_steps_article_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_article_steps
    ADD CONSTRAINT help_article_steps_article_id_fkey FOREIGN KEY (article_id) REFERENCES public.help_articles(id) ON DELETE CASCADE;


--
-- TOC entry 5388 (class 2606 OID 51176)
-- Name: help_articles help_articles_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_articles
    ADD CONSTRAINT help_articles_category_id_fkey FOREIGN KEY (category_id) REFERENCES public.help_categories(id) ON DELETE SET NULL;


--
-- TOC entry 5389 (class 2606 OID 51181)
-- Name: help_articles help_articles_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_articles
    ADD CONSTRAINT help_articles_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5390 (class 2606 OID 51186)
-- Name: help_articles help_articles_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_articles
    ADD CONSTRAINT help_articles_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- TOC entry 5391 (class 2606 OID 51191)
-- Name: help_categories help_categories_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_categories
    ADD CONSTRAINT help_categories_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5392 (class 2606 OID 51196)
-- Name: help_related_articles help_related_articles_article_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_related_articles
    ADD CONSTRAINT help_related_articles_article_id_fkey FOREIGN KEY (article_id) REFERENCES public.help_articles(id) ON DELETE CASCADE;


--
-- TOC entry 5393 (class 2606 OID 51201)
-- Name: help_related_articles help_related_articles_related_article_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.help_related_articles
    ADD CONSTRAINT help_related_articles_related_article_id_fkey FOREIGN KEY (related_article_id) REFERENCES public.help_articles(id) ON DELETE CASCADE;


--
-- TOC entry 5394 (class 2606 OID 51206)
-- Name: hrms_configurations hrms_configurations_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.hrms_configurations
    ADD CONSTRAINT hrms_configurations_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5395 (class 2606 OID 51211)
-- Name: inferred_skills inferred_skills_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.inferred_skills
    ADD CONSTRAINT inferred_skills_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5396 (class 2606 OID 51216)
-- Name: issued_certificates issued_certificates_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.issued_certificates
    ADD CONSTRAINT issued_certificates_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5397 (class 2606 OID 51221)
-- Name: issued_certificates issued_certificates_enrollment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.issued_certificates
    ADD CONSTRAINT issued_certificates_enrollment_id_fkey FOREIGN KEY (enrollment_id) REFERENCES public.enrollments(id) ON DELETE CASCADE;


--
-- TOC entry 5398 (class 2606 OID 51226)
-- Name: issued_certificates issued_certificates_template_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.issued_certificates
    ADD CONSTRAINT issued_certificates_template_id_fkey FOREIGN KEY (template_id) REFERENCES public.certificate_templates(id);


--
-- TOC entry 5399 (class 2606 OID 51231)
-- Name: job_family_competencies job_family_competencies_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.job_family_competencies
    ADD CONSTRAINT job_family_competencies_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5400 (class 2606 OID 51236)
-- Name: job_family_competencies job_family_competencies_job_family_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.job_family_competencies
    ADD CONSTRAINT job_family_competencies_job_family_id_fkey FOREIGN KEY (job_family_id) REFERENCES public.job_families(id) ON DELETE CASCADE;


--
-- TOC entry 5401 (class 2606 OID 51241)
-- Name: learner_badges learner_badges_awarded_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_badges
    ADD CONSTRAINT learner_badges_awarded_by_fkey FOREIGN KEY (awarded_by) REFERENCES public.users(id);


--
-- TOC entry 5402 (class 2606 OID 51246)
-- Name: learner_badges learner_badges_badge_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_badges
    ADD CONSTRAINT learner_badges_badge_id_fkey FOREIGN KEY (badge_id) REFERENCES public.badge_definitions(id) ON DELETE CASCADE;


--
-- TOC entry 5403 (class 2606 OID 51251)
-- Name: learner_badges learner_badges_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_badges
    ADD CONSTRAINT learner_badges_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5404 (class 2606 OID 51256)
-- Name: learner_competency_progress learner_competency_progress_assessed_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_competency_progress
    ADD CONSTRAINT learner_competency_progress_assessed_by_fkey FOREIGN KEY (assessed_by) REFERENCES public.users(id);


--
-- TOC entry 5405 (class 2606 OID 51261)
-- Name: learner_competency_progress learner_competency_progress_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_competency_progress
    ADD CONSTRAINT learner_competency_progress_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5406 (class 2606 OID 51266)
-- Name: learner_competency_progress learner_competency_progress_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_competency_progress
    ADD CONSTRAINT learner_competency_progress_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5407 (class 2606 OID 51271)
-- Name: learner_competency_scores learner_competency_scores_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_competency_scores
    ADD CONSTRAINT learner_competency_scores_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5408 (class 2606 OID 51276)
-- Name: learner_competency_scores learner_competency_scores_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_competency_scores
    ADD CONSTRAINT learner_competency_scores_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5409 (class 2606 OID 51281)
-- Name: learner_learning_paths learner_learning_paths_learning_path_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_learning_paths
    ADD CONSTRAINT learner_learning_paths_learning_path_id_fkey FOREIGN KEY (learning_path_id) REFERENCES public.learning_paths(id) ON DELETE CASCADE;


--
-- TOC entry 5410 (class 2606 OID 51286)
-- Name: learner_notes learner_notes_module_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_notes
    ADD CONSTRAINT learner_notes_module_id_fkey FOREIGN KEY (module_id) REFERENCES public.course_modules(id) ON DELETE CASCADE;


--
-- TOC entry 5411 (class 2606 OID 51291)
-- Name: learner_notifications learner_notifications_related_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_notifications
    ADD CONSTRAINT learner_notifications_related_course_id_fkey FOREIGN KEY (related_course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5412 (class 2606 OID 51296)
-- Name: learner_points learner_points_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learner_points
    ADD CONSTRAINT learner_points_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5413 (class 2606 OID 51301)
-- Name: learning_activity_log learning_activity_log_content_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_activity_log
    ADD CONSTRAINT learning_activity_log_content_id_fkey FOREIGN KEY (content_id) REFERENCES public.module_content(id) ON DELETE CASCADE;


--
-- TOC entry 5414 (class 2606 OID 51306)
-- Name: learning_activity_log learning_activity_log_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_activity_log
    ADD CONSTRAINT learning_activity_log_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5415 (class 2606 OID 51311)
-- Name: learning_path_ai_metadata learning_path_ai_metadata_learning_path_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_path_ai_metadata
    ADD CONSTRAINT learning_path_ai_metadata_learning_path_id_fkey FOREIGN KEY (learning_path_id) REFERENCES public.learning_paths(id) ON DELETE CASCADE;


--
-- TOC entry 5416 (class 2606 OID 51316)
-- Name: learning_path_ai_metadata learning_path_ai_metadata_target_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_path_ai_metadata
    ADD CONSTRAINT learning_path_ai_metadata_target_role_id_fkey FOREIGN KEY (target_role_id) REFERENCES public.organizational_roles(id);


--
-- TOC entry 5417 (class 2606 OID 51321)
-- Name: learning_path_courses learning_path_courses_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_path_courses
    ADD CONSTRAINT learning_path_courses_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5418 (class 2606 OID 51326)
-- Name: learning_path_courses learning_path_courses_learning_path_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_path_courses
    ADD CONSTRAINT learning_path_courses_learning_path_id_fkey FOREIGN KEY (learning_path_id) REFERENCES public.learning_paths(id) ON DELETE CASCADE;


--
-- TOC entry 5419 (class 2606 OID 51331)
-- Name: learning_paths learning_paths_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_paths
    ADD CONSTRAINT learning_paths_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5420 (class 2606 OID 51336)
-- Name: learning_paths learning_paths_target_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.learning_paths
    ADD CONSTRAINT learning_paths_target_competency_id_fkey FOREIGN KEY (target_competency_id) REFERENCES public.competencies(id);


--
-- TOC entry 5421 (class 2606 OID 51341)
-- Name: live_annotations live_annotations_content_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.live_annotations
    ADD CONSTRAINT live_annotations_content_id_fkey FOREIGN KEY (content_id) REFERENCES public.module_content(id);


--
-- TOC entry 5422 (class 2606 OID 51346)
-- Name: live_annotations live_annotations_session_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.live_annotations
    ADD CONSTRAINT live_annotations_session_id_fkey FOREIGN KEY (session_id) REFERENCES public.batch_schedule(id) ON DELETE CASCADE;


--
-- TOC entry 5423 (class 2606 OID 51351)
-- Name: mentor_learners mentor_learners_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.mentor_learners
    ADD CONSTRAINT mentor_learners_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id) ON DELETE CASCADE;


--
-- TOC entry 5424 (class 2606 OID 51356)
-- Name: microlearning_assignments microlearning_assignments_microlearning_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.microlearning_assignments
    ADD CONSTRAINT microlearning_assignments_microlearning_id_fkey FOREIGN KEY (microlearning_id) REFERENCES public.microlearning_content(id) ON DELETE CASCADE;


--
-- TOC entry 5425 (class 2606 OID 51361)
-- Name: microlearning_content microlearning_content_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.microlearning_content
    ADD CONSTRAINT microlearning_content_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE SET NULL;


--
-- TOC entry 5426 (class 2606 OID 51366)
-- Name: microlearning_content microlearning_content_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.microlearning_content
    ADD CONSTRAINT microlearning_content_department_id_fkey FOREIGN KEY (department_id) REFERENCES public.departments(id);


--
-- TOC entry 5427 (class 2606 OID 51371)
-- Name: microlearning_progress microlearning_progress_microlearning_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.microlearning_progress
    ADD CONSTRAINT microlearning_progress_microlearning_id_fkey FOREIGN KEY (microlearning_id) REFERENCES public.microlearning_content(id) ON DELETE CASCADE;


--
-- TOC entry 5428 (class 2606 OID 51376)
-- Name: module_content module_content_module_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.module_content
    ADD CONSTRAINT module_content_module_id_fkey FOREIGN KEY (module_id) REFERENCES public.course_modules(id) ON DELETE CASCADE;


--
-- TOC entry 5429 (class 2606 OID 51381)
-- Name: navigation_items navigation_items_menu_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.navigation_items
    ADD CONSTRAINT navigation_items_menu_id_fkey FOREIGN KEY (menu_id) REFERENCES public.navigation_menus(id) ON DELETE CASCADE;


--
-- TOC entry 5430 (class 2606 OID 51386)
-- Name: navigation_items navigation_items_page_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.navigation_items
    ADD CONSTRAINT navigation_items_page_id_fkey FOREIGN KEY (page_id) REFERENCES public.landing_pages(id) ON DELETE SET NULL;


--
-- TOC entry 5431 (class 2606 OID 51391)
-- Name: navigation_items navigation_items_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.navigation_items
    ADD CONSTRAINT navigation_items_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.navigation_items(id) ON DELETE CASCADE;


--
-- TOC entry 5432 (class 2606 OID 51396)
-- Name: okr_competency_links okr_competency_links_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.okr_competency_links
    ADD CONSTRAINT okr_competency_links_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5433 (class 2606 OID 51401)
-- Name: okr_competency_links okr_competency_links_okr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.okr_competency_links
    ADD CONSTRAINT okr_competency_links_okr_id_fkey FOREIGN KEY (okr_id) REFERENCES public.okrs(id) ON DELETE CASCADE;


--
-- TOC entry 5434 (class 2606 OID 51406)
-- Name: okrs okrs_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.okrs
    ADD CONSTRAINT okrs_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.okrs(id);


--
-- TOC entry 5435 (class 2606 OID 51411)
-- Name: organizational_roles organizational_roles_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.organizational_roles
    ADD CONSTRAINT organizational_roles_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5436 (class 2606 OID 51416)
-- Name: organizational_roles organizational_roles_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.organizational_roles
    ADD CONSTRAINT organizational_roles_department_id_fkey FOREIGN KEY (department_id) REFERENCES public.departments(id) ON DELETE SET NULL;


--
-- TOC entry 5437 (class 2606 OID 51421)
-- Name: organizational_roles organizational_roles_job_family_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.organizational_roles
    ADD CONSTRAINT organizational_roles_job_family_id_fkey FOREIGN KEY (job_family_id) REFERENCES public.job_families(id) ON DELETE SET NULL;


--
-- TOC entry 5438 (class 2606 OID 51426)
-- Name: page_sections page_sections_page_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.page_sections
    ADD CONSTRAINT page_sections_page_id_fkey FOREIGN KEY (page_id) REFERENCES public.landing_pages(id) ON DELETE CASCADE;


--
-- TOC entry 5439 (class 2606 OID 51431)
-- Name: page_sections page_sections_template_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.page_sections
    ADD CONSTRAINT page_sections_template_id_fkey FOREIGN KEY (template_id) REFERENCES public.section_templates(id);


--
-- TOC entry 5440 (class 2606 OID 51436)
-- Name: path_adaptations path_adaptations_personalized_path_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.path_adaptations
    ADD CONSTRAINT path_adaptations_personalized_path_id_fkey FOREIGN KEY (personalized_path_id) REFERENCES public.personalized_paths(id) ON DELETE CASCADE;


--
-- TOC entry 5441 (class 2606 OID 51441)
-- Name: personalized_paths personalized_paths_base_learning_path_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.personalized_paths
    ADD CONSTRAINT personalized_paths_base_learning_path_id_fkey FOREIGN KEY (base_learning_path_id) REFERENCES public.learning_paths(id);


--
-- TOC entry 5442 (class 2606 OID 51446)
-- Name: personalized_paths personalized_paths_target_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.personalized_paths
    ADD CONSTRAINT personalized_paths_target_competency_id_fkey FOREIGN KEY (target_competency_id) REFERENCES public.competencies(id);


--
-- TOC entry 5443 (class 2606 OID 51451)
-- Name: point_rules point_rules_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.point_rules
    ADD CONSTRAINT point_rules_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5444 (class 2606 OID 51456)
-- Name: point_transactions point_transactions_rule_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.point_transactions
    ADD CONSTRAINT point_transactions_rule_id_fkey FOREIGN KEY (rule_id) REFERENCES public.point_rules(id);


--
-- TOC entry 5445 (class 2606 OID 51461)
-- Name: point_transactions point_transactions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.point_transactions
    ADD CONSTRAINT point_transactions_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5446 (class 2606 OID 51466)
-- Name: poll_questions poll_questions_poll_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_questions
    ADD CONSTRAINT poll_questions_poll_id_fkey FOREIGN KEY (poll_id) REFERENCES public.poll_templates(id) ON DELETE CASCADE;


--
-- TOC entry 5447 (class 2606 OID 51471)
-- Name: poll_responses poll_responses_question_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_responses
    ADD CONSTRAINT poll_responses_question_id_fkey FOREIGN KEY (question_id) REFERENCES public.poll_questions(id);


--
-- TOC entry 5448 (class 2606 OID 51476)
-- Name: poll_responses poll_responses_session_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_responses
    ADD CONSTRAINT poll_responses_session_id_fkey FOREIGN KEY (session_id) REFERENCES public.poll_sessions(id) ON DELETE CASCADE;


--
-- TOC entry 5449 (class 2606 OID 51481)
-- Name: poll_responses poll_responses_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_responses
    ADD CONSTRAINT poll_responses_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- TOC entry 5450 (class 2606 OID 51486)
-- Name: poll_results_cache poll_results_cache_question_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_results_cache
    ADD CONSTRAINT poll_results_cache_question_id_fkey FOREIGN KEY (question_id) REFERENCES public.poll_questions(id);


--
-- TOC entry 5451 (class 2606 OID 51491)
-- Name: poll_results_cache poll_results_cache_session_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_results_cache
    ADD CONSTRAINT poll_results_cache_session_id_fkey FOREIGN KEY (session_id) REFERENCES public.poll_sessions(id) ON DELETE CASCADE;


--
-- TOC entry 5452 (class 2606 OID 51496)
-- Name: poll_sessions poll_sessions_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_sessions
    ADD CONSTRAINT poll_sessions_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id);


--
-- TOC entry 5453 (class 2606 OID 51501)
-- Name: poll_sessions poll_sessions_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_sessions
    ADD CONSTRAINT poll_sessions_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id);


--
-- TOC entry 5454 (class 2606 OID 51506)
-- Name: poll_sessions poll_sessions_poll_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_sessions
    ADD CONSTRAINT poll_sessions_poll_id_fkey FOREIGN KEY (poll_id) REFERENCES public.poll_templates(id);


--
-- TOC entry 5455 (class 2606 OID 51511)
-- Name: poll_sessions poll_sessions_started_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_sessions
    ADD CONSTRAINT poll_sessions_started_by_fkey FOREIGN KEY (started_by) REFERENCES public.users(id);


--
-- TOC entry 5456 (class 2606 OID 51516)
-- Name: poll_templates poll_templates_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.poll_templates
    ADD CONSTRAINT poll_templates_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- TOC entry 5457 (class 2606 OID 51521)
-- Name: proficiency_scale_levels proficiency_scale_levels_scale_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.proficiency_scale_levels
    ADD CONSTRAINT proficiency_scale_levels_scale_id_fkey FOREIGN KEY (scale_id) REFERENCES public.proficiency_scales(id) ON DELETE CASCADE;


--
-- TOC entry 5459 (class 2606 OID 51526)
-- Name: profiles profiles_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.profiles
    ADD CONSTRAINT profiles_id_fkey FOREIGN KEY (id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5460 (class 2606 OID 51531)
-- Name: profiles profiles_organizational_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.profiles
    ADD CONSTRAINT profiles_organizational_role_id_fkey FOREIGN KEY (organizational_role_id) REFERENCES public.organizational_roles(id);


--
-- TOC entry 5461 (class 2606 OID 51536)
-- Name: question_analytics question_analytics_assessment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.question_analytics
    ADD CONSTRAINT question_analytics_assessment_id_fkey FOREIGN KEY (assessment_id) REFERENCES public.competency_assessments(id) ON DELETE CASCADE;


--
-- TOC entry 5462 (class 2606 OID 51541)
-- Name: question_bank question_bank_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.question_bank
    ADD CONSTRAINT question_bank_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE SET NULL;


--
-- TOC entry 5463 (class 2606 OID 51546)
-- Name: role_permissions role_permissions_designation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.role_permissions
    ADD CONSTRAINT role_permissions_designation_id_fkey FOREIGN KEY (designation_id) REFERENCES public.designations(id) ON DELETE CASCADE;


--
-- TOC entry 5464 (class 2606 OID 51551)
-- Name: scheduled_reassessments scheduled_reassessments_assessment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.scheduled_reassessments
    ADD CONSTRAINT scheduled_reassessments_assessment_id_fkey FOREIGN KEY (assessment_id) REFERENCES public.competency_assessments(id);


--
-- TOC entry 5465 (class 2606 OID 51556)
-- Name: scheduled_reassessments scheduled_reassessments_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.scheduled_reassessments
    ADD CONSTRAINT scheduled_reassessments_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5466 (class 2606 OID 51561)
-- Name: score_level_mappings score_level_mappings_proficiency_scale_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.score_level_mappings
    ADD CONSTRAINT score_level_mappings_proficiency_scale_id_fkey FOREIGN KEY (proficiency_scale_id) REFERENCES public.proficiency_scales(id) ON DELETE CASCADE;


--
-- TOC entry 5467 (class 2606 OID 51566)
-- Name: session_interactions session_interactions_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.session_interactions
    ADD CONSTRAINT session_interactions_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.session_interactions(id);


--
-- TOC entry 5468 (class 2606 OID 51571)
-- Name: session_interactions session_interactions_session_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.session_interactions
    ADD CONSTRAINT session_interactions_session_id_fkey FOREIGN KEY (session_id) REFERENCES public.batch_schedule(id) ON DELETE CASCADE;


--
-- TOC entry 5469 (class 2606 OID 51576)
-- Name: session_reminders session_reminders_schedule_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.session_reminders
    ADD CONSTRAINT session_reminders_schedule_id_fkey FOREIGN KEY (schedule_id) REFERENCES public.batch_schedule(id) ON DELETE CASCADE;


--
-- TOC entry 5470 (class 2606 OID 51581)
-- Name: skill_mapping_suggestions skill_mapping_suggestions_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.skill_mapping_suggestions
    ADD CONSTRAINT skill_mapping_suggestions_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5471 (class 2606 OID 51586)
-- Name: skill_mapping_suggestions skill_mapping_suggestions_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.skill_mapping_suggestions
    ADD CONSTRAINT skill_mapping_suggestions_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id) ON DELETE CASCADE;


--
-- TOC entry 5472 (class 2606 OID 51591)
-- Name: streak_tracker streak_tracker_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.streak_tracker
    ADD CONSTRAINT streak_tracker_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5473 (class 2606 OID 51596)
-- Name: tag_taxonomy tag_taxonomy_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tag_taxonomy
    ADD CONSTRAINT tag_taxonomy_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.tag_taxonomy(id);


--
-- TOC entry 5474 (class 2606 OID 51601)
-- Name: trainer_feedback_responses trainer_feedback_responses_survey_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.trainer_feedback_responses
    ADD CONSTRAINT trainer_feedback_responses_survey_id_fkey FOREIGN KEY (survey_id) REFERENCES public.trainer_feedback_surveys(id) ON DELETE CASCADE;


--
-- TOC entry 5475 (class 2606 OID 51606)
-- Name: trainer_feedback_surveys trainer_feedback_surveys_batch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.trainer_feedback_surveys
    ADD CONSTRAINT trainer_feedback_surveys_batch_id_fkey FOREIGN KEY (batch_id) REFERENCES public.batches(id);


--
-- TOC entry 5476 (class 2606 OID 51611)
-- Name: trainer_feedback_surveys trainer_feedback_surveys_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.trainer_feedback_surveys
    ADD CONSTRAINT trainer_feedback_surveys_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(id);


--
-- TOC entry 5477 (class 2606 OID 51616)
-- Name: trainer_feedback_surveys trainer_feedback_surveys_template_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.trainer_feedback_surveys
    ADD CONSTRAINT trainer_feedback_surveys_template_id_fkey FOREIGN KEY (template_id) REFERENCES public.feedback_templates(id);


--
-- TOC entry 5478 (class 2606 OID 51621)
-- Name: trainers trainers_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.trainers
    ADD CONSTRAINT trainers_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.profiles(id) ON DELETE SET NULL;


--
-- TOC entry 5479 (class 2606 OID 51626)
-- Name: user_competencies user_competencies_competency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_competencies
    ADD CONSTRAINT user_competencies_competency_id_fkey FOREIGN KEY (competency_id) REFERENCES public.competencies(id) ON DELETE CASCADE;


--
-- TOC entry 5480 (class 2606 OID 51631)
-- Name: user_competencies user_competencies_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_competencies
    ADD CONSTRAINT user_competencies_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5481 (class 2606 OID 51636)
-- Name: user_dashboard_layouts user_dashboard_layouts_template_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_dashboard_layouts
    ADD CONSTRAINT user_dashboard_layouts_template_id_fkey FOREIGN KEY (template_id) REFERENCES public.dashboard_templates(id);


--
-- TOC entry 5482 (class 2606 OID 51641)
-- Name: user_departments user_departments_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_departments
    ADD CONSTRAINT user_departments_department_id_fkey FOREIGN KEY (department_id) REFERENCES public.departments(id) ON DELETE CASCADE;


--
-- TOC entry 5483 (class 2606 OID 51646)
-- Name: user_departments user_departments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_departments
    ADD CONSTRAINT user_departments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5484 (class 2606 OID 51651)
-- Name: user_managers user_managers_manager_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_managers
    ADD CONSTRAINT user_managers_manager_id_fkey FOREIGN KEY (manager_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5485 (class 2606 OID 51656)
-- Name: user_managers user_managers_subordinate_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_managers
    ADD CONSTRAINT user_managers_subordinate_id_fkey FOREIGN KEY (subordinate_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- TOC entry 5487 (class 2606 OID 51661)
-- Name: user_roles user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.user_roles
    ADD CONSTRAINT user_roles_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


-- Completed on 2026-04-02 14:36:50 IST

--
--

\unrestrict VrybCQ1cmIRcNe1eqD3ZbanGgFglCKBYTiFvInvlrIjuefBialDvdhacC1ry9yu

