-- Name: base_employeeshiftday_company_id base_employeeshiftda_employeeshiftday_id_a860dbad_fk_base_empl; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeeshiftday_company_id
    ADD CONSTRAINT base_employeeshiftda_employeeshiftday_id_a860dbad_fk_base_empl FOREIGN KEY (employeeshiftday_id) REFERENCES public.base_employeeshiftday(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_employeeshiftschedule_company_id base_employeeshiftsc_company_id_df72d486_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeeshiftschedule_company_id
    ADD CONSTRAINT base_employeeshiftsc_company_id_df72d486_fk_base_comp FOREIGN KEY (company_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_employeeshiftschedule base_employeeshiftsc_created_by_id_5dda4d62_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeeshiftschedule
    ADD CONSTRAINT base_employeeshiftsc_created_by_id_5dda4d62_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_employeeshiftschedule base_employeeshiftsc_day_id_3adbec28_fk_base_empl; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeeshiftschedule
    ADD CONSTRAINT base_employeeshiftsc_day_id_3adbec28_fk_base_empl FOREIGN KEY (day_id) REFERENCES public.base_employeeshiftday(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_employeeshiftschedule_company_id base_employeeshiftsc_employeeshiftschedul_e3a7a8a4_fk_base_empl; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeeshiftschedule_company_id
    ADD CONSTRAINT base_employeeshiftsc_employeeshiftschedul_e3a7a8a4_fk_base_empl FOREIGN KEY (employeeshiftschedule_id) REFERENCES public.base_employeeshiftschedule(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_employeeshiftschedule base_employeeshiftsc_modified_by_id_4c4cf90a_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeeshiftschedule
    ADD CONSTRAINT base_employeeshiftsc_modified_by_id_4c4cf90a_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_employeeshiftschedule base_employeeshiftsc_shift_id_id_0b0b76ba_fk_base_empl; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeeshiftschedule
    ADD CONSTRAINT base_employeeshiftsc_shift_id_id_0b0b76ba_fk_base_empl FOREIGN KEY (shift_id_id) REFERENCES public.base_employeeshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_employeetype_company_id base_employeetype_co_company_id_fb8006d6_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeetype_company_id
    ADD CONSTRAINT base_employeetype_co_company_id_fb8006d6_fk_base_comp FOREIGN KEY (company_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_employeetype_company_id base_employeetype_co_employeetype_id_0aa55002_fk_base_empl; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeetype_company_id
    ADD CONSTRAINT base_employeetype_co_employeetype_id_0aa55002_fk_base_empl FOREIGN KEY (employeetype_id) REFERENCES public.base_employeetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_employeetype base_employeetype_created_by_id_c6fe9642_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeetype
    ADD CONSTRAINT base_employeetype_created_by_id_c6fe9642_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_employeetype base_employeetype_modified_by_id_cb5ba349_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_employeetype
    ADD CONSTRAINT base_employeetype_modified_by_id_cb5ba349_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalrotatingshiftassign_history_tags base_historicalrotat_audittag_id_814369ae_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalrotatingshiftassign_history_tags
    ADD CONSTRAINT base_historicalrotat_audittag_id_814369ae_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalrotatingworktypeassign_history_tags base_historicalrotat_audittag_id_fbfad6f7_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalrotatingworktypeassign_history_tags
    ADD CONSTRAINT base_historicalrotat_audittag_id_fbfad6f7_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalrotatingshiftassign_history_tags base_historicalrotat_historicalrotatingsh_98c6b941_fk_base_hist; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalrotatingshiftassign_history_tags
    ADD CONSTRAINT base_historicalrotat_historicalrotatingsh_98c6b941_fk_base_hist FOREIGN KEY (historicalrotatingshiftassign_id) REFERENCES public.base_historicalrotatingshiftassign(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalrotatingworktypeassign_history_tags base_historicalrotat_historicalrotatingwo_bbc5caa7_fk_base_hist; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalrotatingworktypeassign_history_tags
    ADD CONSTRAINT base_historicalrotat_historicalrotatingwo_bbc5caa7_fk_base_hist FOREIGN KEY (historicalrotatingworktypeassign_id) REFERENCES public.base_historicalrotatingworktypeassign(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalrotatingshiftassign base_historicalrotat_history_user_id_0e47cd81_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalrotatingshiftassign
    ADD CONSTRAINT base_historicalrotat_history_user_id_0e47cd81_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalrotatingworktypeassign base_historicalrotat_history_user_id_28ca3275_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalrotatingworktypeassign
    ADD CONSTRAINT base_historicalrotat_history_user_id_28ca3275_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalshiftrequest_history_tags base_historicalshift_audittag_id_749e92d3_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalshiftrequest_history_tags
    ADD CONSTRAINT base_historicalshift_audittag_id_749e92d3_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalshiftrequest_history_tags base_historicalshift_historicalshiftreque_847ea50e_fk_base_hist; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalshiftrequest_history_tags
    ADD CONSTRAINT base_historicalshift_historicalshiftreque_847ea50e_fk_base_hist FOREIGN KEY (historicalshiftrequest_id) REFERENCES public.base_historicalshiftrequest(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalshiftrequest base_historicalshift_history_user_id_979ea896_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalshiftrequest
    ADD CONSTRAINT base_historicalshift_history_user_id_979ea896_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalworktyperequest_history_tags base_historicalworkt_audittag_id_e87dd597_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalworktyperequest_history_tags
    ADD CONSTRAINT base_historicalworkt_audittag_id_e87dd597_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalworktyperequest_history_tags base_historicalworkt_historicalworktypere_0e0f338f_fk_base_hist; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalworktyperequest_history_tags
    ADD CONSTRAINT base_historicalworkt_historicalworktypere_0e0f338f_fk_base_hist FOREIGN KEY (historicalworktyperequest_id) REFERENCES public.base_historicalworktyperequest(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_historicalworktyperequest base_historicalworkt_history_user_id_93351399_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_historicalworktyperequest
    ADD CONSTRAINT base_historicalworkt_history_user_id_93351399_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_holidays base_holidays_company_id_id_dcd70297_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_holidays
    ADD CONSTRAINT base_holidays_company_id_id_dcd70297_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_holidays base_holidays_created_by_id_0ddc62ec_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_holidays
    ADD CONSTRAINT base_holidays_created_by_id_0ddc62ec_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_holidays base_holidays_modified_by_id_a4e26e62_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_holidays
    ADD CONSTRAINT base_holidays_modified_by_id_a4e26e62_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_horillamailtemplate base_horillamailtemp_company_id_id_c6322691_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_horillamailtemplate
    ADD CONSTRAINT base_horillamailtemp_company_id_id_c6322691_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_horillamailtemplate base_horillamailtemp_modified_by_id_71c40a87_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_horillamailtemplate
    ADD CONSTRAINT base_horillamailtemp_modified_by_id_71c40a87_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_horillamailtemplate base_horillamailtemplate_created_by_id_878efa95_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_horillamailtemplate
    ADD CONSTRAINT base_horillamailtemplate_created_by_id_878efa95_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_jobposition_company_id base_jobposition_com_company_id_c1803a10_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_jobposition_company_id
    ADD CONSTRAINT base_jobposition_com_company_id_c1803a10_fk_base_comp FOREIGN KEY (company_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_jobposition_company_id base_jobposition_com_jobposition_id_da6fae2f_fk_base_jobp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_jobposition_company_id
    ADD CONSTRAINT base_jobposition_com_jobposition_id_da6fae2f_fk_base_jobp FOREIGN KEY (jobposition_id) REFERENCES public.base_jobposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_jobposition base_jobposition_created_by_id_924524b6_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_jobposition
    ADD CONSTRAINT base_jobposition_created_by_id_924524b6_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_jobposition base_jobposition_department_id_id_3a4e0e2c_fk_base_depa; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_jobposition
    ADD CONSTRAINT base_jobposition_department_id_id_3a4e0e2c_fk_base_depa FOREIGN KEY (department_id_id) REFERENCES public.base_department(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_jobposition base_jobposition_modified_by_id_e834fef8_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_jobposition
    ADD CONSTRAINT base_jobposition_modified_by_id_e834fef8_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_jobrole_company_id base_jobrole_company_id_company_id_00594b32_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_jobrole_company_id
    ADD CONSTRAINT base_jobrole_company_id_company_id_00594b32_fk_base_company_id FOREIGN KEY (company_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_jobrole_company_id base_jobrole_company_id_jobrole_id_0a5b1a10_fk_base_jobrole_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_jobrole_company_id
    ADD CONSTRAINT base_jobrole_company_id_jobrole_id_0a5b1a10_fk_base_jobrole_id FOREIGN KEY (jobrole_id) REFERENCES public.base_jobrole(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_jobrole base_jobrole_created_by_id_295bd2e6_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_jobrole
    ADD CONSTRAINT base_jobrole_created_by_id_295bd2e6_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_jobrole base_jobrole_job_position_id_id_e90dff92_fk_base_jobposition_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_jobrole
    ADD CONSTRAINT base_jobrole_job_position_id_id_e90dff92_fk_base_jobposition_id FOREIGN KEY (job_position_id_id) REFERENCES public.base_jobposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_jobrole base_jobrole_modified_by_id_0560dbfb_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_jobrole
    ADD CONSTRAINT base_jobrole_modified_by_id_0560dbfb_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_multipleapprovalcondition base_multipleapprova_company_id_id_d33471ce_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_multipleapprovalcondition
    ADD CONSTRAINT base_multipleapprova_company_id_id_d33471ce_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_multipleapprovalmanagers base_multipleapprova_condition_id_id_3f6be088_fk_base_mult; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_multipleapprovalmanagers
    ADD CONSTRAINT base_multipleapprova_condition_id_id_3f6be088_fk_base_mult FOREIGN KEY (condition_id_id) REFERENCES public.base_multipleapprovalcondition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_multipleapprovalcondition base_multipleapprova_created_by_id_a833e417_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_multipleapprovalcondition
    ADD CONSTRAINT base_multipleapprova_created_by_id_a833e417_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_multipleapprovalcondition base_multipleapprova_department_id_0123c893_fk_base_depa; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_multipleapprovalcondition
    ADD CONSTRAINT base_multipleapprova_department_id_0123c893_fk_base_depa FOREIGN KEY (department_id) REFERENCES public.base_department(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_multipleapprovalcondition base_multipleapprova_modified_by_id_0248a986_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_multipleapprovalcondition
    ADD CONSTRAINT base_multipleapprova_modified_by_id_0248a986_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_notificationsound base_notificationsou_employee_id_5148afeb_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_notificationsound
    ADD CONSTRAINT base_notificationsou_employee_id_5148afeb_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_penaltyaccounts base_penaltyaccounts_created_by_id_d2cde238_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_penaltyaccounts
    ADD CONSTRAINT base_penaltyaccounts_created_by_id_d2cde238_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_penaltyaccounts base_penaltyaccounts_employee_id_id_edbbe2bb_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_penaltyaccounts
    ADD CONSTRAINT base_penaltyaccounts_employee_id_id_edbbe2bb_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_penaltyaccounts base_penaltyaccounts_late_early_id_id_7a6389d6_fk_attendanc; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_penaltyaccounts
    ADD CONSTRAINT base_penaltyaccounts_late_early_id_id_7a6389d6_fk_attendanc FOREIGN KEY (late_early_id_id) REFERENCES public.attendance_attendancelatecomeearlyout(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_penaltyaccounts base_penaltyaccounts_leave_request_id_id_015a796d_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_penaltyaccounts
    ADD CONSTRAINT base_penaltyaccounts_leave_request_id_id_015a796d_fk_leave_lea FOREIGN KEY (leave_request_id_id) REFERENCES public.leave_leaverequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_penaltyaccounts base_penaltyaccounts_leave_type_id_id_9fbfde5e_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_penaltyaccounts
    ADD CONSTRAINT base_penaltyaccounts_leave_type_id_id_9fbfde5e_fk_leave_lea FOREIGN KEY (leave_type_id_id) REFERENCES public.leave_leavetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_penaltyaccounts base_penaltyaccounts_modified_by_id_ee3da796_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_penaltyaccounts
    ADD CONSTRAINT base_penaltyaccounts_modified_by_id_ee3da796_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingshift base_rotatingshift_created_by_id_9924e341_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingshift
    ADD CONSTRAINT base_rotatingshift_created_by_id_9924e341_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingshift base_rotatingshift_modified_by_id_1bf62cb1_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingshift
    ADD CONSTRAINT base_rotatingshift_modified_by_id_1bf62cb1_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingshift base_rotatingshift_shift1_id_a18464b7_fk_base_employeeshift_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingshift
    ADD CONSTRAINT base_rotatingshift_shift1_id_a18464b7_fk_base_employeeshift_id FOREIGN KEY (shift1_id) REFERENCES public.base_employeeshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingshift base_rotatingshift_shift2_id_14afc77b_fk_base_employeeshift_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingshift
    ADD CONSTRAINT base_rotatingshift_shift2_id_14afc77b_fk_base_employeeshift_id FOREIGN KEY (shift2_id) REFERENCES public.base_employeeshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingshiftassign base_rotatingshiftas_current_shift_id_f546b96a_fk_base_empl; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingshiftassign
    ADD CONSTRAINT base_rotatingshiftas_current_shift_id_f546b96a_fk_base_empl FOREIGN KEY (current_shift_id) REFERENCES public.base_employeeshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingshiftassign base_rotatingshiftas_employee_id_id_2c62486a_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingshiftassign
    ADD CONSTRAINT base_rotatingshiftas_employee_id_id_2c62486a_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingshiftassign base_rotatingshiftas_modified_by_id_dbf1e1c7_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingshiftassign
    ADD CONSTRAINT base_rotatingshiftas_modified_by_id_dbf1e1c7_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingshiftassign base_rotatingshiftas_next_shift_id_f32a9069_fk_base_empl; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingshiftassign
    ADD CONSTRAINT base_rotatingshiftas_next_shift_id_f32a9069_fk_base_empl FOREIGN KEY (next_shift_id) REFERENCES public.base_employeeshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingshiftassign base_rotatingshiftas_rotating_shift_id_id_04b24bbb_fk_base_rota; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingshiftassign
    ADD CONSTRAINT base_rotatingshiftas_rotating_shift_id_id_04b24bbb_fk_base_rota FOREIGN KEY (rotating_shift_id_id) REFERENCES public.base_rotatingshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingshiftassign base_rotatingshiftassign_created_by_id_bc0c9b87_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingshiftassign
    ADD CONSTRAINT base_rotatingshiftassign_created_by_id_bc0c9b87_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingworktypeassign base_rotatingworktyp_created_by_id_f70083f5_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingworktypeassign
    ADD CONSTRAINT base_rotatingworktyp_created_by_id_f70083f5_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingworktypeassign base_rotatingworktyp_current_work_type_id_011f4ef1_fk_base_work; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingworktypeassign
    ADD CONSTRAINT base_rotatingworktyp_current_work_type_id_011f4ef1_fk_base_work FOREIGN KEY (current_work_type_id) REFERENCES public.base_worktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingworktypeassign base_rotatingworktyp_employee_id_id_7df12772_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingworktypeassign
    ADD CONSTRAINT base_rotatingworktyp_employee_id_id_7df12772_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingworktypeassign base_rotatingworktyp_modified_by_id_617a9333_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingworktypeassign
    ADD CONSTRAINT base_rotatingworktyp_modified_by_id_617a9333_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingworktypeassign base_rotatingworktyp_next_work_type_id_51672d14_fk_base_work; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingworktypeassign
    ADD CONSTRAINT base_rotatingworktyp_next_work_type_id_51672d14_fk_base_work FOREIGN KEY (next_work_type_id) REFERENCES public.base_worktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingworktypeassign base_rotatingworktyp_rotating_work_type_i_25af494e_fk_base_rota; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingworktypeassign
    ADD CONSTRAINT base_rotatingworktyp_rotating_work_type_i_25af494e_fk_base_rota FOREIGN KEY (rotating_work_type_id_id) REFERENCES public.base_rotatingworktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingworktype base_rotatingworktyp_work_type1_id_3db498c9_fk_base_work; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingworktype
    ADD CONSTRAINT base_rotatingworktyp_work_type1_id_3db498c9_fk_base_work FOREIGN KEY (work_type1_id) REFERENCES public.base_worktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingworktype base_rotatingworktyp_work_type2_id_c8539552_fk_base_work; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingworktype
    ADD CONSTRAINT base_rotatingworktyp_work_type2_id_c8539552_fk_base_work FOREIGN KEY (work_type2_id) REFERENCES public.base_worktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingworktype base_rotatingworktype_created_by_id_3e26c1b7_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingworktype
    ADD CONSTRAINT base_rotatingworktype_created_by_id_3e26c1b7_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_rotatingworktype base_rotatingworktype_modified_by_id_b561415c_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_rotatingworktype
    ADD CONSTRAINT base_rotatingworktype_modified_by_id_b561415c_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequest base_shiftrequest_created_by_id_bea31919_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequest
    ADD CONSTRAINT base_shiftrequest_created_by_id_bea31919_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequest base_shiftrequest_employee_id_id_a5fa6bd9_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequest
    ADD CONSTRAINT base_shiftrequest_employee_id_id_a5fa6bd9_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequest base_shiftrequest_modified_by_id_3062fe89_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequest
    ADD CONSTRAINT base_shiftrequest_modified_by_id_3062fe89_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequest base_shiftrequest_previous_shift_id_id_e5d96887_fk_base_empl; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequest
    ADD CONSTRAINT base_shiftrequest_previous_shift_id_id_e5d96887_fk_base_empl FOREIGN KEY (previous_shift_id_id) REFERENCES public.base_employeeshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequest base_shiftrequest_reallocate_to_id_48ba7a4e_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequest
    ADD CONSTRAINT base_shiftrequest_reallocate_to_id_48ba7a4e_fk_employee_ FOREIGN KEY (reallocate_to_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequest base_shiftrequest_shift_id_id_c5024f4a_fk_base_employeeshift_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequest
    ADD CONSTRAINT base_shiftrequest_shift_id_id_c5024f4a_fk_base_employeeshift_id FOREIGN KEY (shift_id_id) REFERENCES public.base_employeeshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequestcomment_files base_shiftrequestcom_baserequestfile_id_7db65962_fk_base_base; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequestcomment_files
    ADD CONSTRAINT base_shiftrequestcom_baserequestfile_id_7db65962_fk_base_base FOREIGN KEY (baserequestfile_id) REFERENCES public.base_baserequestfile(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequestcomment base_shiftrequestcom_employee_id_id_48e54a2f_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequestcomment
    ADD CONSTRAINT base_shiftrequestcom_employee_id_id_48e54a2f_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequestcomment base_shiftrequestcom_modified_by_id_18deac02_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequestcomment
    ADD CONSTRAINT base_shiftrequestcom_modified_by_id_18deac02_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequestcomment base_shiftrequestcom_request_id_id_bd54b51e_fk_base_shif; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequestcomment
    ADD CONSTRAINT base_shiftrequestcom_request_id_id_bd54b51e_fk_base_shif FOREIGN KEY (request_id_id) REFERENCES public.base_shiftrequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequestcomment_files base_shiftrequestcom_shiftrequestcomment__ee9b60b3_fk_base_shif; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequestcomment_files
    ADD CONSTRAINT base_shiftrequestcom_shiftrequestcomment__ee9b60b3_fk_base_shif FOREIGN KEY (shiftrequestcomment_id) REFERENCES public.base_shiftrequestcomment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_shiftrequestcomment base_shiftrequestcomment_created_by_id_21ea5fad_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_shiftrequestcomment
    ADD CONSTRAINT base_shiftrequestcomment_created_by_id_21ea5fad_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_tags base_tags_company_id_id_ec9a08f4_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_tags
    ADD CONSTRAINT base_tags_company_id_id_ec9a08f4_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_tags base_tags_created_by_id_16be081b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_tags
    ADD CONSTRAINT base_tags_created_by_id_16be081b_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_tags base_tags_modified_by_id_7e6e7fb2_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_tags
    ADD CONSTRAINT base_tags_modified_by_id_7e6e7fb2_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_tracklatecomeearlyout base_tracklatecomeea_created_by_id_998011af_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_tracklatecomeearlyout
    ADD CONSTRAINT base_tracklatecomeea_created_by_id_998011af_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_tracklatecomeearlyout base_tracklatecomeea_modified_by_id_ddef4b5e_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_tracklatecomeearlyout
    ADD CONSTRAINT base_tracklatecomeea_modified_by_id_ddef4b5e_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktype_company_id base_worktype_compan_worktype_id_29a81247_fk_base_work; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktype_company_id
    ADD CONSTRAINT base_worktype_compan_worktype_id_29a81247_fk_base_work FOREIGN KEY (worktype_id) REFERENCES public.base_worktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktype_company_id base_worktype_company_id_company_id_d2d58a62_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktype_company_id
    ADD CONSTRAINT base_worktype_company_id_company_id_d2d58a62_fk_base_company_id FOREIGN KEY (company_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktype base_worktype_created_by_id_bebc20f6_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktype
    ADD CONSTRAINT base_worktype_created_by_id_bebc20f6_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktype base_worktype_modified_by_id_15d81354_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktype
    ADD CONSTRAINT base_worktype_modified_by_id_15d81354_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequestcomment_files base_worktyperequest_baserequestfile_id_56f0cad3_fk_base_base; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequestcomment_files
    ADD CONSTRAINT base_worktyperequest_baserequestfile_id_56f0cad3_fk_base_base FOREIGN KEY (baserequestfile_id) REFERENCES public.base_baserequestfile(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequestcomment base_worktyperequest_created_by_id_90ecf6c8_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequestcomment
    ADD CONSTRAINT base_worktyperequest_created_by_id_90ecf6c8_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequest base_worktyperequest_created_by_id_da875da8_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequest
    ADD CONSTRAINT base_worktyperequest_created_by_id_da875da8_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequestcomment base_worktyperequest_employee_id_id_5f0b0e04_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequestcomment
    ADD CONSTRAINT base_worktyperequest_employee_id_id_5f0b0e04_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequest base_worktyperequest_employee_id_id_d747036a_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequest
    ADD CONSTRAINT base_worktyperequest_employee_id_id_d747036a_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequestcomment base_worktyperequest_modified_by_id_ac63c417_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequestcomment
    ADD CONSTRAINT base_worktyperequest_modified_by_id_ac63c417_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequest base_worktyperequest_modified_by_id_cf5dcbb5_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequest
    ADD CONSTRAINT base_worktyperequest_modified_by_id_cf5dcbb5_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequest base_worktyperequest_previous_work_type_i_0187b88f_fk_base_work; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequest
    ADD CONSTRAINT base_worktyperequest_previous_work_type_i_0187b88f_fk_base_work FOREIGN KEY (previous_work_type_id_id) REFERENCES public.base_worktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequestcomment base_worktyperequest_request_id_id_802359b4_fk_base_work; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequestcomment
    ADD CONSTRAINT base_worktyperequest_request_id_id_802359b4_fk_base_work FOREIGN KEY (request_id_id) REFERENCES public.base_worktyperequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequest base_worktyperequest_work_type_id_id_cff6cd3f_fk_base_work; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequest
    ADD CONSTRAINT base_worktyperequest_work_type_id_id_cff6cd3f_fk_base_work FOREIGN KEY (work_type_id_id) REFERENCES public.base_worktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: base_worktyperequestcomment_files base_worktyperequest_worktyperequestcomme_4f8ea110_fk_base_work; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.base_worktyperequestcomment_files
    ADD CONSTRAINT base_worktyperequest_worktyperequestcomme_4f8ea110_fk_base_work FOREIGN KEY (worktyperequestcomment_id) REFERENCES public.base_worktyperequestcomment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: biometric_biometricdevices biometric_biometricd_company_id_id_24f01059_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.biometric_biometricdevices
    ADD CONSTRAINT biometric_biometricd_company_id_id_24f01059_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: biometric_biometricdevices biometric_biometricd_created_by_id_e53d3c02_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.biometric_biometricdevices
    ADD CONSTRAINT biometric_biometricd_created_by_id_e53d3c02_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: biometric_biometricdevices biometric_biometricd_modified_by_id_4a3ba0a1_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.biometric_biometricdevices
    ADD CONSTRAINT biometric_biometricd_modified_by_id_4a3ba0a1_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: biometric_biometricemployees biometric_biometrice_device_id_id_a109542b_fk_biometric; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.biometric_biometricemployees
    ADD CONSTRAINT biometric_biometrice_device_id_id_a109542b_fk_biometric FOREIGN KEY (device_id_id) REFERENCES public.biometric_biometricdevices(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: biometric_biometricemployees biometric_biometrice_employee_id_id_f8a27dce_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.biometric_biometricemployees
    ADD CONSTRAINT biometric_biometrice_employee_id_id_f8a27dce_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: biometric_cosecattendancearguments biometric_cosecatten_device_id_id_d1307353_fk_biometric; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.biometric_cosecattendancearguments
    ADD CONSTRAINT biometric_cosecatten_device_id_id_d1307353_fk_biometric FOREIGN KEY (device_id_id) REFERENCES public.biometric_biometricdevices(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: django_admin_log django_admin_log_content_type_id_c4bce8eb_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.django_admin_log
    ADD CONSTRAINT django_admin_log_content_type_id_c4bce8eb_fk_django_co FOREIGN KEY (content_type_id) REFERENCES public.django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: django_admin_log django_admin_log_user_id_c564eba6_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.django_admin_log
    ADD CONSTRAINT django_admin_log_user_id_c564eba6_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: django_apscheduler_djangojobexecution django_apscheduler_djangojobexecution_job_id_daf5090a_fk; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.django_apscheduler_djangojobexecution
    ADD CONSTRAINT django_apscheduler_djangojobexecution_job_id_daf5090a_fk FOREIGN KEY (job_id) REFERENCES public.django_apscheduler_djangojob(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_actiontype employee_actiontype_created_by_id_9cd886e5_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_actiontype
    ADD CONSTRAINT employee_actiontype_created_by_id_9cd886e5_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_actiontype employee_actiontype_modified_by_id_ca03f5db_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_actiontype
    ADD CONSTRAINT employee_actiontype_modified_by_id_ca03f5db_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_bonuspoint employee_bonuspoint_created_by_id_2ce413ab_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_bonuspoint
    ADD CONSTRAINT employee_bonuspoint_created_by_id_2ce413ab_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_bonuspoint employee_bonuspoint_employee_id_id_e90a6454_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_bonuspoint
    ADD CONSTRAINT employee_bonuspoint_employee_id_id_e90a6454_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_bonuspoint employee_bonuspoint_modified_by_id_3041354b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_bonuspoint
    ADD CONSTRAINT employee_bonuspoint_modified_by_id_3041354b_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_disciplinaryaction employee_disciplinar_action_id_a7d291be_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_disciplinaryaction
    ADD CONSTRAINT employee_disciplinar_action_id_a7d291be_fk_employee_ FOREIGN KEY (action_id) REFERENCES public.employee_actiontype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_disciplinaryaction employee_disciplinar_created_by_id_7fc312af_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_disciplinaryaction
    ADD CONSTRAINT employee_disciplinar_created_by_id_7fc312af_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_disciplinaryaction_employee_id employee_disciplinar_disciplinaryaction_i_e4d129d5_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_disciplinaryaction_employee_id
    ADD CONSTRAINT employee_disciplinar_disciplinaryaction_i_e4d129d5_fk_employee_ FOREIGN KEY (disciplinaryaction_id) REFERENCES public.employee_disciplinaryaction(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_disciplinaryaction_employee_id employee_disciplinar_employee_id_c3b19929_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_disciplinaryaction_employee_id
    ADD CONSTRAINT employee_disciplinar_employee_id_c3b19929_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_disciplinaryaction employee_disciplinar_modified_by_id_7eaa64e1_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_disciplinaryaction
    ADD CONSTRAINT employee_disciplinar_modified_by_id_7eaa64e1_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employee employee_employee_employee_user_id_id_4c6da5a5_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employee
    ADD CONSTRAINT employee_employee_employee_user_id_id_4c6da5a5_fk_auth_user_id FOREIGN KEY (employee_user_id_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeebankdetails employee_employeeban_created_by_id_eb03d5bb_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeebankdetails
    ADD CONSTRAINT employee_employeeban_created_by_id_eb03d5bb_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeebankdetails employee_employeeban_employee_id_id_7e827d9c_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeebankdetails
    ADD CONSTRAINT employee_employeeban_employee_id_id_7e827d9c_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeebankdetails employee_employeeban_modified_by_id_8726ef48_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeebankdetails
    ADD CONSTRAINT employee_employeeban_modified_by_id_8726ef48_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeegeneralsetting employee_employeegen_company_id_id_6cf00960_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeegeneralsetting
    ADD CONSTRAINT employee_employeegen_company_id_id_6cf00960_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeegeneralsetting employee_employeegen_created_by_id_03d5751d_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeegeneralsetting
    ADD CONSTRAINT employee_employeegen_created_by_id_03d5751d_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeegeneralsetting employee_employeegen_modified_by_id_47e9b29b_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeegeneralsetting
    ADD CONSTRAINT employee_employeegen_modified_by_id_47e9b29b_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeenote employee_employeenot_employee_id_id_b9fd028b_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeenote
    ADD CONSTRAINT employee_employeenot_employee_id_id_b9fd028b_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeenote_note_files employee_employeenot_employeenote_id_68e119b7_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeenote_note_files
    ADD CONSTRAINT employee_employeenot_employeenote_id_68e119b7_fk_employee_ FOREIGN KEY (employeenote_id) REFERENCES public.employee_employeenote(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeenote_note_files employee_employeenot_notefiles_id_4fff24b8_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeenote_note_files
    ADD CONSTRAINT employee_employeenot_notefiles_id_4fff24b8_fk_employee_ FOREIGN KEY (notefiles_id) REFERENCES public.employee_notefiles(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeenote employee_employeenot_updated_by_id_03758b94_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeenote
    ADD CONSTRAINT employee_employeenot_updated_by_id_03758b94_fk_employee_ FOREIGN KEY (updated_by_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeenote employee_employeenote_created_by_id_2ca9060d_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeenote
    ADD CONSTRAINT employee_employeenote_created_by_id_2ca9060d_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeenote employee_employeenote_modified_by_id_eaeca7b4_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeenote
    ADD CONSTRAINT employee_employeenote_modified_by_id_eaeca7b4_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeetag employee_employeetag_created_by_id_9bd7d192_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeetag
    ADD CONSTRAINT employee_employeetag_created_by_id_9bd7d192_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeetag employee_employeetag_modified_by_id_c671878b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeetag
    ADD CONSTRAINT employee_employeetag_modified_by_id_c671878b_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation employee_employeewor_company_id_id_51e946d8_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation
    ADD CONSTRAINT employee_employeewor_company_id_id_51e946d8_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation employee_employeewor_department_id_id_31d2170f_fk_base_depa; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation
    ADD CONSTRAINT employee_employeewor_department_id_id_31d2170f_fk_base_depa FOREIGN KEY (department_id_id) REFERENCES public.base_department(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation employee_employeewor_employee_id_id_65dfe2ce_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation
    ADD CONSTRAINT employee_employeewor_employee_id_id_65dfe2ce_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation employee_employeewor_employee_type_id_id_f7707903_fk_base_empl; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation
    ADD CONSTRAINT employee_employeewor_employee_type_id_id_f7707903_fk_base_empl FOREIGN KEY (employee_type_id_id) REFERENCES public.base_employeetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation_tags employee_employeewor_employeetag_id_d877fd1d_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation_tags
    ADD CONSTRAINT employee_employeewor_employeetag_id_d877fd1d_fk_employee_ FOREIGN KEY (employeetag_id) REFERENCES public.employee_employeetag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation_tags employee_employeewor_employeeworkinformat_adc704f0_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation_tags
    ADD CONSTRAINT employee_employeewor_employeeworkinformat_adc704f0_fk_employee_ FOREIGN KEY (employeeworkinformation_id) REFERENCES public.employee_employeeworkinformation(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation employee_employeewor_job_position_id_id_447a02c3_fk_base_jobp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation
    ADD CONSTRAINT employee_employeewor_job_position_id_id_447a02c3_fk_base_jobp FOREIGN KEY (job_position_id_id) REFERENCES public.base_jobposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation employee_employeewor_job_role_id_id_b7032a1b_fk_base_jobr; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation
    ADD CONSTRAINT employee_employeewor_job_role_id_id_b7032a1b_fk_base_jobr FOREIGN KEY (job_role_id_id) REFERENCES public.base_jobrole(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation employee_employeewor_reporting_manager_id_3f4c7fc4_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation
    ADD CONSTRAINT employee_employeewor_reporting_manager_id_3f4c7fc4_fk_employee_ FOREIGN KEY (reporting_manager_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation employee_employeewor_shift_id_id_868ad7f1_fk_base_empl; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation
    ADD CONSTRAINT employee_employeewor_shift_id_id_868ad7f1_fk_base_empl FOREIGN KEY (shift_id_id) REFERENCES public.base_employeeshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_employeeworkinformation employee_employeewor_work_type_id_id_e48fe5c7_fk_base_work; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_employeeworkinformation
    ADD CONSTRAINT employee_employeewor_work_type_id_id_e48fe5c7_fk_base_work FOREIGN KEY (work_type_id_id) REFERENCES public.base_worktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_historicalbonuspoint_history_tags employee_historicalb_audittag_id_d2a36a4e_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_historicalbonuspoint_history_tags
    ADD CONSTRAINT employee_historicalb_audittag_id_d2a36a4e_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_historicalbonuspoint_history_tags employee_historicalb_historicalbonuspoint_40f9c15d_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_historicalbonuspoint_history_tags
    ADD CONSTRAINT employee_historicalb_historicalbonuspoint_40f9c15d_fk_employee_ FOREIGN KEY (historicalbonuspoint_id) REFERENCES public.employee_historicalbonuspoint(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_historicalbonuspoint employee_historicalb_history_user_id_a529213d_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_historicalbonuspoint
    ADD CONSTRAINT employee_historicalb_history_user_id_a529213d_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_historicalemployeeworkinformation_history_tags employee_historicale_audittag_id_b7e25442_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_historicalemployeeworkinformation_history_tags
    ADD CONSTRAINT employee_historicale_audittag_id_b7e25442_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_historicalemployeeworkinformation_history_tags employee_historicale_historicalemployeewo_ebf6f81c_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_historicalemployeeworkinformation_history_tags
    ADD CONSTRAINT employee_historicale_historicalemployeewo_ebf6f81c_fk_employee_ FOREIGN KEY (historicalemployeeworkinformation_id) REFERENCES public.employee_historicalemployeeworkinformation(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_historicalemployeeworkinformation employee_historicale_history_user_id_1977e79f_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_historicalemployeeworkinformation
    ADD CONSTRAINT employee_historicale_history_user_id_1977e79f_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_notefiles employee_notefiles_created_by_id_52d05add_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_notefiles
    ADD CONSTRAINT employee_notefiles_created_by_id_52d05add_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_notefiles employee_notefiles_modified_by_id_6f97580a_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_notefiles
    ADD CONSTRAINT employee_notefiles_modified_by_id_6f97580a_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_policy_attachments employee_policy_atta_policy_id_d1ac21df_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_policy_attachments
    ADD CONSTRAINT employee_policy_atta_policy_id_d1ac21df_fk_employee_ FOREIGN KEY (policy_id) REFERENCES public.employee_policy(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_policy_attachments employee_policy_atta_policymultiplefile_i_5a893d6a_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_policy_attachments
    ADD CONSTRAINT employee_policy_atta_policymultiplefile_i_5a893d6a_fk_employee_ FOREIGN KEY (policymultiplefile_id) REFERENCES public.employee_policymultiplefile(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_policy_company_id employee_policy_comp_company_id_423bd625_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_policy_company_id
    ADD CONSTRAINT employee_policy_comp_company_id_423bd625_fk_base_comp FOREIGN KEY (company_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_policy_company_id employee_policy_comp_policy_id_76c891af_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_policy_company_id
    ADD CONSTRAINT employee_policy_comp_policy_id_76c891af_fk_employee_ FOREIGN KEY (policy_id) REFERENCES public.employee_policy(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_policy employee_policy_created_by_id_9bd13cc9_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_policy
    ADD CONSTRAINT employee_policy_created_by_id_9bd13cc9_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_policy employee_policy_modified_by_id_30e119fc_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_policy
    ADD CONSTRAINT employee_policy_modified_by_id_30e119fc_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_policy_specific_employees employee_policy_spec_employee_id_25986e79_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_policy_specific_employees
    ADD CONSTRAINT employee_policy_spec_employee_id_25986e79_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_policy_specific_employees employee_policy_spec_policy_id_7a905ba6_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_policy_specific_employees
    ADD CONSTRAINT employee_policy_spec_policy_id_7a905ba6_fk_employee_ FOREIGN KEY (policy_id) REFERENCES public.employee_policy(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_policymultiplefile employee_policymulti_created_by_id_ad34b84e_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_policymultiplefile
    ADD CONSTRAINT employee_policymulti_created_by_id_ad34b84e_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_policymultiplefile employee_policymulti_modified_by_id_212f8be6_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_policymultiplefile
    ADD CONSTRAINT employee_policymulti_modified_by_id_212f8be6_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_profileeditfeature employee_profileedit_created_by_id_91dbab11_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_profileeditfeature
    ADD CONSTRAINT employee_profileedit_created_by_id_91dbab11_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: employee_profileeditfeature employee_profileedit_modified_by_id_a601d18a_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.employee_profileeditfeature
    ADD CONSTRAINT employee_profileedit_modified_by_id_a601d18a_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: facedetection_employeefacedetection facedetection_employ_employee_id_id_eac48b33_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.facedetection_employeefacedetection
    ADD CONSTRAINT facedetection_employ_employee_id_id_eac48b33_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: facedetection_facedetection facedetection_facede_company_id_id_856a31ca_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.facedetection_facedetection
    ADD CONSTRAINT facedetection_facede_company_id_id_856a31ca_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: geofencing_geofencing geofencing_geofencing_company_id_id_023f4b88_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.geofencing_geofencing
    ADD CONSTRAINT geofencing_geofencing_company_id_id_023f4b88_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_attachment helpdesk_attachment_comment_id_91b1d9ce_fk_helpdesk_comment_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_attachment
    ADD CONSTRAINT helpdesk_attachment_comment_id_91b1d9ce_fk_helpdesk_comment_id FOREIGN KEY (comment_id) REFERENCES public.helpdesk_comment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_attachment helpdesk_attachment_created_by_id_1c9c4492_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_attachment
    ADD CONSTRAINT helpdesk_attachment_created_by_id_1c9c4492_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_attachment helpdesk_attachment_modified_by_id_92fd74ee_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_attachment
    ADD CONSTRAINT helpdesk_attachment_modified_by_id_92fd74ee_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_attachment helpdesk_attachment_ticket_id_9aa7f330_fk_helpdesk_ticket_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_attachment
    ADD CONSTRAINT helpdesk_attachment_ticket_id_9aa7f330_fk_helpdesk_ticket_id FOREIGN KEY (ticket_id) REFERENCES public.helpdesk_ticket(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_claimrequest helpdesk_claimreques_employee_id_id_32aadd98_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_claimrequest
    ADD CONSTRAINT helpdesk_claimreques_employee_id_id_32aadd98_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_claimrequest helpdesk_claimreques_ticket_id_id_d5306331_fk_helpdesk_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_claimrequest
    ADD CONSTRAINT helpdesk_claimreques_ticket_id_id_d5306331_fk_helpdesk_ FOREIGN KEY (ticket_id_id) REFERENCES public.helpdesk_ticket(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_claimrequest helpdesk_claimrequest_created_by_id_b6780703_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_claimrequest
    ADD CONSTRAINT helpdesk_claimrequest_created_by_id_b6780703_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_claimrequest helpdesk_claimrequest_modified_by_id_7d52986e_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_claimrequest
    ADD CONSTRAINT helpdesk_claimrequest_modified_by_id_7d52986e_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_comment helpdesk_comment_created_by_id_07b33a87_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_comment
    ADD CONSTRAINT helpdesk_comment_created_by_id_07b33a87_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_comment helpdesk_comment_employee_id_id_09671cb9_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_comment
    ADD CONSTRAINT helpdesk_comment_employee_id_id_09671cb9_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_comment helpdesk_comment_modified_by_id_9cecf91c_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_comment
    ADD CONSTRAINT helpdesk_comment_modified_by_id_9cecf91c_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_comment helpdesk_comment_ticket_id_c00da1fb_fk_helpdesk_ticket_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_comment
    ADD CONSTRAINT helpdesk_comment_ticket_id_c00da1fb_fk_helpdesk_ticket_id FOREIGN KEY (ticket_id) REFERENCES public.helpdesk_ticket(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_departmentmanager helpdesk_departmentm_company_id_id_4aa258db_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_departmentmanager
    ADD CONSTRAINT helpdesk_departmentm_company_id_id_4aa258db_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_departmentmanager helpdesk_departmentm_created_by_id_429ef9c3_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_departmentmanager
    ADD CONSTRAINT helpdesk_departmentm_created_by_id_429ef9c3_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_departmentmanager helpdesk_departmentm_department_id_aec70b87_fk_base_depa; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_departmentmanager
    ADD CONSTRAINT helpdesk_departmentm_department_id_aec70b87_fk_base_depa FOREIGN KEY (department_id) REFERENCES public.base_department(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_departmentmanager helpdesk_departmentm_manager_id_826b081d_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_departmentmanager
    ADD CONSTRAINT helpdesk_departmentm_manager_id_826b081d_fk_employee_ FOREIGN KEY (manager_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_departmentmanager helpdesk_departmentm_modified_by_id_99acea72_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_departmentmanager
    ADD CONSTRAINT helpdesk_departmentm_modified_by_id_99acea72_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_faq helpdesk_faq_category_id_df198307_fk_helpdesk_faqcategory_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_faq
    ADD CONSTRAINT helpdesk_faq_category_id_df198307_fk_helpdesk_faqcategory_id FOREIGN KEY (category_id) REFERENCES public.helpdesk_faqcategory(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_faq helpdesk_faq_company_id_id_5d618d3f_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_faq
    ADD CONSTRAINT helpdesk_faq_company_id_id_5d618d3f_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_faq helpdesk_faq_created_by_id_106edcde_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_faq
    ADD CONSTRAINT helpdesk_faq_created_by_id_106edcde_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_faq helpdesk_faq_modified_by_id_95f51873_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_faq
    ADD CONSTRAINT helpdesk_faq_modified_by_id_95f51873_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_faq_tags helpdesk_faq_tags_faq_id_fb60403b_fk_helpdesk_faq_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_faq_tags
    ADD CONSTRAINT helpdesk_faq_tags_faq_id_fb60403b_fk_helpdesk_faq_id FOREIGN KEY (faq_id) REFERENCES public.helpdesk_faq(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_faq_tags helpdesk_faq_tags_tags_id_8bf80890_fk_base_tags_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_faq_tags
    ADD CONSTRAINT helpdesk_faq_tags_tags_id_8bf80890_fk_base_tags_id FOREIGN KEY (tags_id) REFERENCES public.base_tags(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_faqcategory helpdesk_faqcategory_company_id_id_804d6e9b_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_faqcategory
    ADD CONSTRAINT helpdesk_faqcategory_company_id_id_804d6e9b_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_faqcategory helpdesk_faqcategory_created_by_id_551ed468_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_faqcategory
    ADD CONSTRAINT helpdesk_faqcategory_created_by_id_551ed468_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_faqcategory helpdesk_faqcategory_modified_by_id_39f245eb_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_faqcategory
    ADD CONSTRAINT helpdesk_faqcategory_modified_by_id_39f245eb_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_historicalticket_history_tags helpdesk_historicalt_audittag_id_5fd5a887_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_historicalticket_history_tags
    ADD CONSTRAINT helpdesk_historicalt_audittag_id_5fd5a887_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_historicalticket_history_tags helpdesk_historicalt_historicalticket_id_2e6a3113_fk_helpdesk_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_historicalticket_history_tags
    ADD CONSTRAINT helpdesk_historicalt_historicalticket_id_2e6a3113_fk_helpdesk_ FOREIGN KEY (historicalticket_id) REFERENCES public.helpdesk_historicalticket(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_historicalticket helpdesk_historicalt_history_user_id_fe620449_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_historicalticket
    ADD CONSTRAINT helpdesk_historicalt_history_user_id_fe620449_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_ticket_assigned_to helpdesk_ticket_assi_employee_id_0bb736bc_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_ticket_assigned_to
    ADD CONSTRAINT helpdesk_ticket_assi_employee_id_0bb736bc_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_ticket_assigned_to helpdesk_ticket_assi_ticket_id_63d4ab83_fk_helpdesk_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_ticket_assigned_to
    ADD CONSTRAINT helpdesk_ticket_assi_ticket_id_63d4ab83_fk_helpdesk_ FOREIGN KEY (ticket_id) REFERENCES public.helpdesk_ticket(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_ticket helpdesk_ticket_created_by_id_d27fab9b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_ticket
    ADD CONSTRAINT helpdesk_ticket_created_by_id_d27fab9b_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_ticket helpdesk_ticket_employee_id_id_8ee8c449_fk_employee_employee_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_ticket
    ADD CONSTRAINT helpdesk_ticket_employee_id_id_8ee8c449_fk_employee_employee_id FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_ticket helpdesk_ticket_modified_by_id_89892e93_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_ticket
    ADD CONSTRAINT helpdesk_ticket_modified_by_id_89892e93_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_ticket_tags helpdesk_ticket_tags_tags_id_9964f9a6_fk_base_tags_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_ticket_tags
    ADD CONSTRAINT helpdesk_ticket_tags_tags_id_9964f9a6_fk_base_tags_id FOREIGN KEY (tags_id) REFERENCES public.base_tags(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_ticket_tags helpdesk_ticket_tags_ticket_id_ee2dfd5d_fk_helpdesk_ticket_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_ticket_tags
    ADD CONSTRAINT helpdesk_ticket_tags_ticket_id_ee2dfd5d_fk_helpdesk_ticket_id FOREIGN KEY (ticket_id) REFERENCES public.helpdesk_ticket(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_ticket helpdesk_ticket_ticket_type_id_f444cfdc_fk_helpdesk_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_ticket
    ADD CONSTRAINT helpdesk_ticket_ticket_type_id_f444cfdc_fk_helpdesk_ FOREIGN KEY (ticket_type_id) REFERENCES public.helpdesk_tickettype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_tickettype helpdesk_tickettype_company_id_id_79c589c3_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_tickettype
    ADD CONSTRAINT helpdesk_tickettype_company_id_id_79c589c3_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_tickettype helpdesk_tickettype_created_by_id_2cec5ee8_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_tickettype
    ADD CONSTRAINT helpdesk_tickettype_created_by_id_2cec5ee8_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: helpdesk_tickettype helpdesk_tickettype_modified_by_id_009acadd_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.helpdesk_tickettype
    ADD CONSTRAINT helpdesk_tickettype_modified_by_id_009acadd_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_audit_accountblockunblock horilla_audit_accoun_created_by_id_2d0903f4_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_audit_accountblockunblock
    ADD CONSTRAINT horilla_audit_accoun_created_by_id_2d0903f4_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_audit_accountblockunblock horilla_audit_accoun_modified_by_id_e06c2411_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_audit_accountblockunblock
    ADD CONSTRAINT horilla_audit_accoun_modified_by_id_e06c2411_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_audit_historytrackingfields horilla_audit_histor_created_by_id_27e3200d_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_audit_historytrackingfields
    ADD CONSTRAINT horilla_audit_histor_created_by_id_27e3200d_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_audit_historytrackingfields horilla_audit_histor_modified_by_id_f18a1c2b_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_audit_historytrackingfields
    ADD CONSTRAINT horilla_audit_histor_modified_by_id_f18a1c2b_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_automations_mailautomation horilla_automations__created_by_id_f608ac56_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_automations_mailautomation
    ADD CONSTRAINT horilla_automations__created_by_id_f608ac56_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_automations_mailautomation_also_sent_to horilla_automations__employee_id_171dec3c_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_automations_mailautomation_also_sent_to
    ADD CONSTRAINT horilla_automations__employee_id_171dec3c_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_automations_mailautomation_template_attachments horilla_automations__horillamailtemplate__5690af76_fk_base_hori; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_automations_mailautomation_template_attachments
    ADD CONSTRAINT horilla_automations__horillamailtemplate__5690af76_fk_base_hori FOREIGN KEY (horillamailtemplate_id) REFERENCES public.base_horillamailtemplate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_automations_mailautomation horilla_automations__mail_template_id_2e72212b_fk_base_hori; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_automations_mailautomation
    ADD CONSTRAINT horilla_automations__mail_template_id_2e72212b_fk_base_hori FOREIGN KEY (mail_template_id) REFERENCES public.base_horillamailtemplate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_automations_mailautomation_template_attachments horilla_automations__mailautomation_id_98de9e7f_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_automations_mailautomation_template_attachments
    ADD CONSTRAINT horilla_automations__mailautomation_id_98de9e7f_fk_horilla_a FOREIGN KEY (mailautomation_id) REFERENCES public.horilla_automations_mailautomation(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_automations_mailautomation_also_sent_to horilla_automations__mailautomation_id_f07a90e5_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_automations_mailautomation_also_sent_to
    ADD CONSTRAINT horilla_automations__mailautomation_id_f07a90e5_fk_horilla_a FOREIGN KEY (mailautomation_id) REFERENCES public.horilla_automations_mailautomation(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_automations_mailautomation horilla_automations__modified_by_id_6e3b0f9c_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_automations_mailautomation
    ADD CONSTRAINT horilla_automations__modified_by_id_6e3b0f9c_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_documents_document horilla_documents_do_created_by_id_27ebe6f9_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_documents_document
    ADD CONSTRAINT horilla_documents_do_created_by_id_27ebe6f9_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_documents_documentrequest horilla_documents_do_created_by_id_2d57c3d0_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_documents_documentrequest
    ADD CONSTRAINT horilla_documents_do_created_by_id_2d57c3d0_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_documents_document horilla_documents_do_document_request_id__c7d87c9d_fk_horilla_d; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_documents_document
    ADD CONSTRAINT horilla_documents_do_document_request_id__c7d87c9d_fk_horilla_d FOREIGN KEY (document_request_id_id) REFERENCES public.horilla_documents_documentrequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_documents_documentrequest_employee_id horilla_documents_do_documentrequest_id_946f3c45_fk_horilla_d; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_documents_documentrequest_employee_id
    ADD CONSTRAINT horilla_documents_do_documentrequest_id_946f3c45_fk_horilla_d FOREIGN KEY (documentrequest_id) REFERENCES public.horilla_documents_documentrequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_documents_documentrequest_employee_id horilla_documents_do_employee_id_fae3d473_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_documents_documentrequest_employee_id
    ADD CONSTRAINT horilla_documents_do_employee_id_fae3d473_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_documents_document horilla_documents_do_employee_id_id_5ef97a47_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_documents_document
    ADD CONSTRAINT horilla_documents_do_employee_id_id_5ef97a47_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_documents_documentrequest horilla_documents_do_modified_by_id_011217e2_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_documents_documentrequest
    ADD CONSTRAINT horilla_documents_do_modified_by_id_011217e2_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_documents_document horilla_documents_do_modified_by_id_fd191cc3_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_documents_document
    ADD CONSTRAINT horilla_documents_do_modified_by_id_fd191cc3_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_activegroup horilla_views_active_created_by_id_1dfd304f_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_activegroup
    ADD CONSTRAINT horilla_views_active_created_by_id_1dfd304f_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_activeview horilla_views_active_modified_by_id_76961f19_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_activeview
    ADD CONSTRAINT horilla_views_active_modified_by_id_76961f19_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_activegroup horilla_views_active_modified_by_id_c56c9f77_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_activegroup
    ADD CONSTRAINT horilla_views_active_modified_by_id_c56c9f77_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_activetab horilla_views_activetab_created_by_id_51b1de73_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_activetab
    ADD CONSTRAINT horilla_views_activetab_created_by_id_51b1de73_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_activetab horilla_views_activetab_modified_by_id_b2ed9a4f_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_activetab
    ADD CONSTRAINT horilla_views_activetab_modified_by_id_b2ed9a4f_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_activeview horilla_views_activeview_created_by_id_bd3fa3b0_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_activeview
    ADD CONSTRAINT horilla_views_activeview_created_by_id_bd3fa3b0_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_savedfilter horilla_views_savedf_created_by_id_b518dec7_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_savedfilter
    ADD CONSTRAINT horilla_views_savedf_created_by_id_b518dec7_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_savedfilter horilla_views_savedf_modified_by_id_b634027b_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_savedfilter
    ADD CONSTRAINT horilla_views_savedf_modified_by_id_b634027b_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_togglecolumn horilla_views_toggle_created_by_id_78544c63_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_togglecolumn
    ADD CONSTRAINT horilla_views_toggle_created_by_id_78544c63_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_togglecolumn horilla_views_toggle_modified_by_id_870460c9_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_togglecolumn
    ADD CONSTRAINT horilla_views_toggle_modified_by_id_870460c9_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: horilla_views_togglecolumn horilla_views_togglecolumn_user_id_id_d9e19c10_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.horilla_views_togglecolumn
    ADD CONSTRAINT horilla_views_togglecolumn_user_id_id_d9e19c10_fk_auth_user_id FOREIGN KEY (user_id_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_availableleave leave_availableleave_created_by_id_75d3a012_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_availableleave
    ADD CONSTRAINT leave_availableleave_created_by_id_75d3a012_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_availableleave leave_availableleave_employee_id_id_3de1ccfe_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_availableleave
    ADD CONSTRAINT leave_availableleave_employee_id_id_3de1ccfe_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_availableleave leave_availableleave_leave_type_id_id_b0a6a9df_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_availableleave
    ADD CONSTRAINT leave_availableleave_leave_type_id_id_b0a6a9df_fk_leave_lea FOREIGN KEY (leave_type_id_id) REFERENCES public.leave_leavetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_availableleave leave_availableleave_modified_by_id_12a52a9f_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_availableleave
    ADD CONSTRAINT leave_availableleave_modified_by_id_12a52a9f_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_companyleave leave_companyleave_company_id_id_3b9c39d2_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_companyleave
    ADD CONSTRAINT leave_companyleave_company_id_id_3b9c39d2_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_companyleave leave_companyleave_created_by_id_d1124f9a_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_companyleave
    ADD CONSTRAINT leave_companyleave_created_by_id_d1124f9a_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_companyleave leave_companyleave_modified_by_id_443e3b4e_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_companyleave
    ADD CONSTRAINT leave_companyleave_modified_by_id_443e3b4e_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequest_attendance_id leave_compensatoryle_attendance_id_7ce6282a_fk_attendanc; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequest_attendance_id
    ADD CONSTRAINT leave_compensatoryle_attendance_id_7ce6282a_fk_attendanc FOREIGN KEY (attendance_id) REFERENCES public.attendance_attendance(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequestcomment_files leave_compensatoryle_compensatoryleavereq_d9216e38_fk_leave_com; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequestcomment_files
    ADD CONSTRAINT leave_compensatoryle_compensatoryleavereq_d9216e38_fk_leave_com FOREIGN KEY (compensatoryleaverequestcomment_id) REFERENCES public.leave_compensatoryleaverequestcomment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequest_attendance_id leave_compensatoryle_compensatoryleavereq_fb4c2ddd_fk_leave_com; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequest_attendance_id
    ADD CONSTRAINT leave_compensatoryle_compensatoryleavereq_fb4c2ddd_fk_leave_com FOREIGN KEY (compensatoryleaverequest_id) REFERENCES public.leave_compensatoryleaverequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequestcomment leave_compensatoryle_created_by_id_598d2be4_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequestcomment
    ADD CONSTRAINT leave_compensatoryle_created_by_id_598d2be4_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequest leave_compensatoryle_created_by_id_a533f271_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequest
    ADD CONSTRAINT leave_compensatoryle_created_by_id_a533f271_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequestcomment leave_compensatoryle_employee_id_id_0641cfdd_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequestcomment
    ADD CONSTRAINT leave_compensatoryle_employee_id_id_0641cfdd_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequest leave_compensatoryle_employee_id_id_c2d214d6_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequest
    ADD CONSTRAINT leave_compensatoryle_employee_id_id_c2d214d6_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequest leave_compensatoryle_leave_type_id_id_47c030a2_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequest
    ADD CONSTRAINT leave_compensatoryle_leave_type_id_id_47c030a2_fk_leave_lea FOREIGN KEY (leave_type_id_id) REFERENCES public.leave_leavetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequestcomment_files leave_compensatoryle_leaverequestfile_id_cc53628f_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequestcomment_files
    ADD CONSTRAINT leave_compensatoryle_leaverequestfile_id_cc53628f_fk_leave_lea FOREIGN KEY (leaverequestfile_id) REFERENCES public.leave_leaverequestfile(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequestcomment leave_compensatoryle_modified_by_id_6a26749a_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequestcomment
    ADD CONSTRAINT leave_compensatoryle_modified_by_id_6a26749a_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequest leave_compensatoryle_modified_by_id_ea6163b7_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequest
    ADD CONSTRAINT leave_compensatoryle_modified_by_id_ea6163b7_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_compensatoryleaverequestcomment leave_compensatoryle_request_id_id_dd5729ca_fk_leave_com; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_compensatoryleaverequestcomment
    ADD CONSTRAINT leave_compensatoryle_request_id_id_dd5729ca_fk_leave_com FOREIGN KEY (request_id_id) REFERENCES public.leave_compensatoryleaverequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_employeepastleaverestrict leave_employeepastle_created_by_id_c1663d75_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_employeepastleaverestrict
    ADD CONSTRAINT leave_employeepastle_created_by_id_c1663d75_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_employeepastleaverestrict leave_employeepastle_modified_by_id_abfc1efe_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_employeepastleaverestrict
    ADD CONSTRAINT leave_employeepastle_modified_by_id_abfc1efe_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalavailableleave_history_tags leave_historicalavai_audittag_id_16f9c7b7_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalavailableleave_history_tags
    ADD CONSTRAINT leave_historicalavai_audittag_id_16f9c7b7_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalavailableleave_history_tags leave_historicalavai_historicalavailablel_3015fcbf_fk_leave_his; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalavailableleave_history_tags
    ADD CONSTRAINT leave_historicalavai_historicalavailablel_3015fcbf_fk_leave_his FOREIGN KEY (historicalavailableleave_id) REFERENCES public.leave_historicalavailableleave(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalavailableleave leave_historicalavai_history_user_id_38f3a774_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalavailableleave
    ADD CONSTRAINT leave_historicalavai_history_user_id_38f3a774_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalcompensatoryleaverequest_history_tags leave_historicalcomp_audittag_id_24ff99a6_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalcompensatoryleaverequest_history_tags
    ADD CONSTRAINT leave_historicalcomp_audittag_id_24ff99a6_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalcompensatoryleaverequest_history_tags leave_historicalcomp_historicalcompensato_6146f2d9_fk_leave_his; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalcompensatoryleaverequest_history_tags
    ADD CONSTRAINT leave_historicalcomp_historicalcompensato_6146f2d9_fk_leave_his FOREIGN KEY (historicalcompensatoryleaverequest_id) REFERENCES public.leave_historicalcompensatoryleaverequest(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalcompensatoryleaverequest leave_historicalcomp_history_user_id_20a9d7af_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalcompensatoryleaverequest
    ADD CONSTRAINT leave_historicalcomp_history_user_id_20a9d7af_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalleaverequest_history_tags leave_historicalleav_audittag_id_53adf68d_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalleaverequest_history_tags
    ADD CONSTRAINT leave_historicalleav_audittag_id_53adf68d_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalleaveallocationrequest_history_tags leave_historicalleav_audittag_id_b2aa60d9_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalleaveallocationrequest_history_tags
    ADD CONSTRAINT leave_historicalleav_audittag_id_b2aa60d9_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalleaveallocationrequest_history_tags leave_historicalleav_historicalleavealloc_e3b6fb3a_fk_leave_his; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalleaveallocationrequest_history_tags
    ADD CONSTRAINT leave_historicalleav_historicalleavealloc_e3b6fb3a_fk_leave_his FOREIGN KEY (historicalleaveallocationrequest_id) REFERENCES public.leave_historicalleaveallocationrequest(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalleaverequest_history_tags leave_historicalleav_historicalleavereque_98d6407d_fk_leave_his; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalleaverequest_history_tags
    ADD CONSTRAINT leave_historicalleav_historicalleavereque_98d6407d_fk_leave_his FOREIGN KEY (historicalleaverequest_id) REFERENCES public.leave_historicalleaverequest(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalleaveallocationrequest leave_historicalleav_history_user_id_4b781dd5_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalleaveallocationrequest
    ADD CONSTRAINT leave_historicalleav_history_user_id_4b781dd5_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_historicalleaverequest leave_historicalleav_history_user_id_e4091693_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_historicalleaverequest
    ADD CONSTRAINT leave_historicalleav_history_user_id_e4091693_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_holiday leave_holiday_company_id_id_13975602_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_holiday
    ADD CONSTRAINT leave_holiday_company_id_id_13975602_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_holiday leave_holiday_created_by_id_053c9356_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_holiday
    ADD CONSTRAINT leave_holiday_created_by_id_053c9356_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_holiday leave_holiday_modified_by_id_40ef9af8_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_holiday
    ADD CONSTRAINT leave_holiday_modified_by_id_40ef9af8_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaveallocationrequestcomment leave_leaveallocatio_created_by_id_284eb30c_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaveallocationrequestcomment
    ADD CONSTRAINT leave_leaveallocatio_created_by_id_284eb30c_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaveallocationrequest leave_leaveallocatio_created_by_id_92cdfae6_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaveallocationrequest
    ADD CONSTRAINT leave_leaveallocatio_created_by_id_92cdfae6_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaveallocationrequest leave_leaveallocatio_employee_id_id_5316112b_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaveallocationrequest
    ADD CONSTRAINT leave_leaveallocatio_employee_id_id_5316112b_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaveallocationrequestcomment leave_leaveallocatio_employee_id_id_c7bb44c4_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaveallocationrequestcomment
    ADD CONSTRAINT leave_leaveallocatio_employee_id_id_c7bb44c4_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaveallocationrequest leave_leaveallocatio_leave_type_id_id_d548f4a6_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaveallocationrequest
    ADD CONSTRAINT leave_leaveallocatio_leave_type_id_id_d548f4a6_fk_leave_lea FOREIGN KEY (leave_type_id_id) REFERENCES public.leave_leavetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaveallocationrequestcomment_files leave_leaveallocatio_leaveallocationreque_5aaf615b_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaveallocationrequestcomment_files
    ADD CONSTRAINT leave_leaveallocatio_leaveallocationreque_5aaf615b_fk_leave_lea FOREIGN KEY (leaveallocationrequestcomment_id) REFERENCES public.leave_leaveallocationrequestcomment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaveallocationrequestcomment_files leave_leaveallocatio_leaverequestfile_id_5298ebaf_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaveallocationrequestcomment_files
    ADD CONSTRAINT leave_leaveallocatio_leaverequestfile_id_5298ebaf_fk_leave_lea FOREIGN KEY (leaverequestfile_id) REFERENCES public.leave_leaverequestfile(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaveallocationrequestcomment leave_leaveallocatio_modified_by_id_8b578167_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaveallocationrequestcomment
    ADD CONSTRAINT leave_leaveallocatio_modified_by_id_8b578167_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaveallocationrequest leave_leaveallocatio_modified_by_id_d7f086e9_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaveallocationrequest
    ADD CONSTRAINT leave_leaveallocatio_modified_by_id_d7f086e9_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaveallocationrequestcomment leave_leaveallocatio_request_id_id_6d41135e_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaveallocationrequestcomment
    ADD CONSTRAINT leave_leaveallocatio_request_id_id_6d41135e_fk_leave_lea FOREIGN KEY (request_id_id) REFERENCES public.leave_leaveallocationrequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leavegeneralsetting leave_leavegeneralse_company_id_id_9f0b5af7_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leavegeneralsetting
    ADD CONSTRAINT leave_leavegeneralse_company_id_id_9f0b5af7_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leavegeneralsetting leave_leavegeneralse_created_by_id_f09effc2_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leavegeneralsetting
    ADD CONSTRAINT leave_leavegeneralse_created_by_id_f09effc2_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leavegeneralsetting leave_leavegeneralse_modified_by_id_748bc603_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leavegeneralsetting
    ADD CONSTRAINT leave_leavegeneralse_modified_by_id_748bc603_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequest leave_leaverequest_created_by_id_138d1e03_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequest
    ADD CONSTRAINT leave_leaverequest_created_by_id_138d1e03_fk_employee_ FOREIGN KEY (created_by_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequest leave_leaverequest_employee_id_id_5126d5dc_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequest
    ADD CONSTRAINT leave_leaverequest_employee_id_id_5126d5dc_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequest leave_leaverequest_leave_type_id_id_9e99d24a_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequest
    ADD CONSTRAINT leave_leaverequest_leave_type_id_id_9e99d24a_fk_leave_lea FOREIGN KEY (leave_type_id_id) REFERENCES public.leave_leavetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequest leave_leaverequest_modified_by_id_f81b1097_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequest
    ADD CONSTRAINT leave_leaverequest_modified_by_id_f81b1097_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequestcomment leave_leaverequestco_created_by_id_a2bd9ae7_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequestcomment
    ADD CONSTRAINT leave_leaverequestco_created_by_id_a2bd9ae7_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequestcomment leave_leaverequestco_employee_id_id_9468873e_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequestcomment
    ADD CONSTRAINT leave_leaverequestco_employee_id_id_9468873e_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequestconditionapproval leave_leaverequestco_leave_request_id_id_13609871_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequestconditionapproval
    ADD CONSTRAINT leave_leaverequestco_leave_request_id_id_13609871_fk_leave_lea FOREIGN KEY (leave_request_id_id) REFERENCES public.leave_leaverequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequestcomment_files leave_leaverequestco_leaverequestcomment__07e0f8a7_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequestcomment_files
    ADD CONSTRAINT leave_leaverequestco_leaverequestcomment__07e0f8a7_fk_leave_lea FOREIGN KEY (leaverequestcomment_id) REFERENCES public.leave_leaverequestcomment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequestcomment_files leave_leaverequestco_leaverequestfile_id_bf9a097c_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequestcomment_files
    ADD CONSTRAINT leave_leaverequestco_leaverequestfile_id_bf9a097c_fk_leave_lea FOREIGN KEY (leaverequestfile_id) REFERENCES public.leave_leaverequestfile(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequestconditionapproval leave_leaverequestco_manager_id_id_8cb0a287_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequestconditionapproval
    ADD CONSTRAINT leave_leaverequestco_manager_id_id_8cb0a287_fk_employee_ FOREIGN KEY (manager_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequestcomment leave_leaverequestco_modified_by_id_c85fa15c_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequestcomment
    ADD CONSTRAINT leave_leaverequestco_modified_by_id_c85fa15c_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leaverequestcomment leave_leaverequestco_request_id_id_c2c8ef1c_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leaverequestcomment
    ADD CONSTRAINT leave_leaverequestco_request_id_id_c2c8ef1c_fk_leave_lea FOREIGN KEY (request_id_id) REFERENCES public.leave_leaverequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leavetype leave_leavetype_company_id_id_cfef117a_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leavetype
    ADD CONSTRAINT leave_leavetype_company_id_id_cfef117a_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leavetype leave_leavetype_created_by_id_351073eb_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leavetype
    ADD CONSTRAINT leave_leavetype_created_by_id_351073eb_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_leavetype leave_leavetype_modified_by_id_beabc67d_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_leavetype
    ADD CONSTRAINT leave_leavetype_modified_by_id_beabc67d_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_overrideleaverequests leave_overrideleaver_leaverequest_ptr_id_a67fbda0_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_overrideleaverequests
    ADD CONSTRAINT leave_overrideleaver_leaverequest_ptr_id_a67fbda0_fk_leave_lea FOREIGN KEY (leaverequest_ptr_id) REFERENCES public.leave_leaverequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_restrictleave_job_position leave_restrictleave__jobposition_id_1f32135f_fk_base_jobp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_restrictleave_job_position
    ADD CONSTRAINT leave_restrictleave__jobposition_id_1f32135f_fk_base_jobp FOREIGN KEY (jobposition_id) REFERENCES public.base_jobposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_restrictleave_spesific_leave_types leave_restrictleave__leavetype_id_7173a1ff_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_restrictleave_spesific_leave_types
    ADD CONSTRAINT leave_restrictleave__leavetype_id_7173a1ff_fk_leave_lea FOREIGN KEY (leavetype_id) REFERENCES public.leave_leavetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_restrictleave_exclued_leave_types leave_restrictleave__leavetype_id_742bf599_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_restrictleave_exclued_leave_types
    ADD CONSTRAINT leave_restrictleave__leavetype_id_742bf599_fk_leave_lea FOREIGN KEY (leavetype_id) REFERENCES public.leave_leavetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_restrictleave_spesific_leave_types leave_restrictleave__restrictleave_id_7dd5075f_fk_leave_res; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_restrictleave_spesific_leave_types
    ADD CONSTRAINT leave_restrictleave__restrictleave_id_7dd5075f_fk_leave_res FOREIGN KEY (restrictleave_id) REFERENCES public.leave_restrictleave(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_restrictleave_job_position leave_restrictleave__restrictleave_id_95f0bc8a_fk_leave_res; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_restrictleave_job_position
    ADD CONSTRAINT leave_restrictleave__restrictleave_id_95f0bc8a_fk_leave_res FOREIGN KEY (restrictleave_id) REFERENCES public.leave_restrictleave(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_restrictleave_exclued_leave_types leave_restrictleave__restrictleave_id_9ab38ff7_fk_leave_res; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_restrictleave_exclued_leave_types
    ADD CONSTRAINT leave_restrictleave__restrictleave_id_9ab38ff7_fk_leave_res FOREIGN KEY (restrictleave_id) REFERENCES public.leave_restrictleave(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_restrictleave leave_restrictleave_company_id_id_b80b2702_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_restrictleave
    ADD CONSTRAINT leave_restrictleave_company_id_id_b80b2702_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_restrictleave leave_restrictleave_created_by_id_f94684d0_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_restrictleave
    ADD CONSTRAINT leave_restrictleave_created_by_id_f94684d0_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_restrictleave leave_restrictleave_department_id_75207328_fk_base_depa; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_restrictleave
    ADD CONSTRAINT leave_restrictleave_department_id_75207328_fk_base_depa FOREIGN KEY (department_id) REFERENCES public.base_department(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: leave_restrictleave leave_restrictleave_modified_by_id_9d60c77a_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.leave_restrictleave
    ADD CONSTRAINT leave_restrictleave_modified_by_id_9d60c77a_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: notifications_notification notifications_notifi_action_object_conten_7d2b8ee9_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.notifications_notification
    ADD CONSTRAINT notifications_notifi_action_object_conten_7d2b8ee9_fk_django_co FOREIGN KEY (action_object_content_type_id) REFERENCES public.django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: notifications_notification notifications_notifi_actor_content_type_i_0c69d7b7_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.notifications_notification
    ADD CONSTRAINT notifications_notifi_actor_content_type_i_0c69d7b7_fk_django_co FOREIGN KEY (actor_content_type_id) REFERENCES public.django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: notifications_notification notifications_notifi_recipient_id_d055f3f0_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.notifications_notification
    ADD CONSTRAINT notifications_notifi_recipient_id_d055f3f0_fk_auth_user FOREIGN KEY (recipient_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: notifications_notification notifications_notifi_target_content_type__ccb24d88_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.notifications_notification
    ADD CONSTRAINT notifications_notifi_target_content_type__ccb24d88_fk_django_co FOREIGN KEY (target_content_type_id) REFERENCES public.django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_employeetask offboarding_employee_employee_id_id_d0c791ba_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_employeetask
    ADD CONSTRAINT offboarding_employee_employee_id_id_d0c791ba_fk_offboardi FOREIGN KEY (employee_id_id) REFERENCES public.offboarding_offboardingemployee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_employeetask offboarding_employee_modified_by_id_564e145a_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_employeetask
    ADD CONSTRAINT offboarding_employee_modified_by_id_564e145a_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_employeetask offboarding_employee_task_id_id_6f5a19ea_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_employeetask
    ADD CONSTRAINT offboarding_employee_task_id_id_6f5a19ea_fk_offboardi FOREIGN KEY (task_id_id) REFERENCES public.offboarding_offboardingtask(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_employeetask offboarding_employeetask_created_by_id_11277aff_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_employeetask
    ADD CONSTRAINT offboarding_employeetask_created_by_id_11277aff_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_exitreason_attachments offboarding_exitreas_exitreason_id_187bf31f_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_exitreason_attachments
    ADD CONSTRAINT offboarding_exitreas_exitreason_id_187bf31f_fk_offboardi FOREIGN KEY (exitreason_id) REFERENCES public.offboarding_exitreason(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_exitreason offboarding_exitreas_offboarding_employee_d148fca3_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_exitreason
    ADD CONSTRAINT offboarding_exitreas_offboarding_employee_d148fca3_fk_offboardi FOREIGN KEY (offboarding_employee_id_id) REFERENCES public.offboarding_offboardingemployee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_exitreason_attachments offboarding_exitreas_offboardingstagemult_4bd29ac5_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_exitreason_attachments
    ADD CONSTRAINT offboarding_exitreas_offboardingstagemult_4bd29ac5_fk_offboardi FOREIGN KEY (offboardingstagemultiplefile_id) REFERENCES public.offboarding_offboardingstagemultiplefile(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_exitreason offboarding_exitreason_created_by_id_d6024369_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_exitreason
    ADD CONSTRAINT offboarding_exitreason_created_by_id_d6024369_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_exitreason offboarding_exitreason_modified_by_id_da33e427_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_exitreason
    ADD CONSTRAINT offboarding_exitreason_modified_by_id_da33e427_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_historicalemployeetask_history_tags offboarding_historic_audittag_id_699903e0_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_historicalemployeetask_history_tags
    ADD CONSTRAINT offboarding_historic_audittag_id_699903e0_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_historicalemployeetask_history_tags offboarding_historic_historicalemployeeta_2286f22e_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_historicalemployeetask_history_tags
    ADD CONSTRAINT offboarding_historic_historicalemployeeta_2286f22e_fk_offboardi FOREIGN KEY (historicalemployeetask_id) REFERENCES public.offboarding_historicalemployeetask(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_historicalemployeetask offboarding_historic_history_user_id_321703d9_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_historicalemployeetask
    ADD CONSTRAINT offboarding_historic_history_user_id_321703d9_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardinggeneralsetting offboarding_offboard_company_id_id_01502765_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardinggeneralsetting
    ADD CONSTRAINT offboarding_offboard_company_id_id_01502765_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboarding offboarding_offboard_company_id_id_6eb1a773_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboarding
    ADD CONSTRAINT offboarding_offboard_company_id_id_6eb1a773_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingtask offboarding_offboard_created_by_id_2bf9dfe4_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingtask
    ADD CONSTRAINT offboarding_offboard_created_by_id_2bf9dfe4_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingstage offboarding_offboard_created_by_id_59a2c750_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingstage
    ADD CONSTRAINT offboarding_offboard_created_by_id_59a2c750_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardinggeneralsetting offboarding_offboard_created_by_id_5e2e2e96_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardinggeneralsetting
    ADD CONSTRAINT offboarding_offboard_created_by_id_5e2e2e96_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingnote offboarding_offboard_created_by_id_8fe36e26_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingnote
    ADD CONSTRAINT offboarding_offboard_created_by_id_8fe36e26_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingemployee offboarding_offboard_created_by_id_948a3f67_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingemployee
    ADD CONSTRAINT offboarding_offboard_created_by_id_948a3f67_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingstagemultiplefile offboarding_offboard_created_by_id_aeb6efb9_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingstagemultiplefile
    ADD CONSTRAINT offboarding_offboard_created_by_id_aeb6efb9_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingtask_managers offboarding_offboard_employee_id_7bf8bbd0_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingtask_managers
    ADD CONSTRAINT offboarding_offboard_employee_id_7bf8bbd0_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboarding_managers offboarding_offboard_employee_id_bf56f847_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboarding_managers
    ADD CONSTRAINT offboarding_offboard_employee_id_bf56f847_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingstage_managers offboarding_offboard_employee_id_e0f30dcf_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingstage_managers
    ADD CONSTRAINT offboarding_offboard_employee_id_e0f30dcf_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingnote offboarding_offboard_employee_id_id_91402889_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingnote
    ADD CONSTRAINT offboarding_offboard_employee_id_id_91402889_fk_offboardi FOREIGN KEY (employee_id_id) REFERENCES public.offboarding_offboardingemployee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingemployee offboarding_offboard_employee_id_id_bb6620e1_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingemployee
    ADD CONSTRAINT offboarding_offboard_employee_id_id_bb6620e1_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingemployee offboarding_offboard_modified_by_id_26d15b17_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingemployee
    ADD CONSTRAINT offboarding_offboard_modified_by_id_26d15b17_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardinggeneralsetting offboarding_offboard_modified_by_id_51027037_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardinggeneralsetting
    ADD CONSTRAINT offboarding_offboard_modified_by_id_51027037_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingnote offboarding_offboard_modified_by_id_6ffcc05b_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingnote
    ADD CONSTRAINT offboarding_offboard_modified_by_id_6ffcc05b_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingstagemultiplefile offboarding_offboard_modified_by_id_89479299_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingstagemultiplefile
    ADD CONSTRAINT offboarding_offboard_modified_by_id_89479299_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingstage offboarding_offboard_modified_by_id_b077ba09_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingstage
    ADD CONSTRAINT offboarding_offboard_modified_by_id_b077ba09_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingtask offboarding_offboard_modified_by_id_ca2e6344_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingtask
    ADD CONSTRAINT offboarding_offboard_modified_by_id_ca2e6344_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingnote offboarding_offboard_note_by_id_f52f0996_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingnote
    ADD CONSTRAINT offboarding_offboard_note_by_id_f52f0996_fk_employee_ FOREIGN KEY (note_by_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboarding_managers offboarding_offboard_offboarding_id_b2fa84b0_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboarding_managers
    ADD CONSTRAINT offboarding_offboard_offboarding_id_b2fa84b0_fk_offboardi FOREIGN KEY (offboarding_id) REFERENCES public.offboarding_offboarding(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingstage offboarding_offboard_offboarding_id_id_da071a69_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingstage
    ADD CONSTRAINT offboarding_offboard_offboarding_id_id_da071a69_fk_offboardi FOREIGN KEY (offboarding_id_id) REFERENCES public.offboarding_offboarding(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingnote_attachments offboarding_offboard_offboardingnote_id_8fff891a_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingnote_attachments
    ADD CONSTRAINT offboarding_offboard_offboardingnote_id_8fff891a_fk_offboardi FOREIGN KEY (offboardingnote_id) REFERENCES public.offboarding_offboardingnote(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingstage_managers offboarding_offboard_offboardingstage_id_717c52fc_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingstage_managers
    ADD CONSTRAINT offboarding_offboard_offboardingstage_id_717c52fc_fk_offboardi FOREIGN KEY (offboardingstage_id) REFERENCES public.offboarding_offboardingstage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingnote_attachments offboarding_offboard_offboardingstagemult_4ecbaca9_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingnote_attachments
    ADD CONSTRAINT offboarding_offboard_offboardingstagemult_4ecbaca9_fk_offboardi FOREIGN KEY (offboardingstagemultiplefile_id) REFERENCES public.offboarding_offboardingstagemultiplefile(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingtask_managers offboarding_offboard_offboardingtask_id_5b5b2ed8_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingtask_managers
    ADD CONSTRAINT offboarding_offboard_offboardingtask_id_5b5b2ed8_fk_offboardi FOREIGN KEY (offboardingtask_id) REFERENCES public.offboarding_offboardingtask(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingemployee offboarding_offboard_stage_id_id_20811923_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingemployee
    ADD CONSTRAINT offboarding_offboard_stage_id_id_20811923_fk_offboardi FOREIGN KEY (stage_id_id) REFERENCES public.offboarding_offboardingstage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingnote offboarding_offboard_stage_id_id_886a66b9_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingnote
    ADD CONSTRAINT offboarding_offboard_stage_id_id_886a66b9_fk_offboardi FOREIGN KEY (stage_id_id) REFERENCES public.offboarding_offboardingstage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboardingtask offboarding_offboard_stage_id_id_da56fc56_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboardingtask
    ADD CONSTRAINT offboarding_offboard_stage_id_id_da56fc56_fk_offboardi FOREIGN KEY (stage_id_id) REFERENCES public.offboarding_offboardingstage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboarding offboarding_offboarding_created_by_id_08c743a3_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboarding
    ADD CONSTRAINT offboarding_offboarding_created_by_id_08c743a3_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_offboarding offboarding_offboarding_modified_by_id_64c7c296_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_offboarding
    ADD CONSTRAINT offboarding_offboarding_modified_by_id_64c7c296_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_resignationletter offboarding_resignat_created_by_id_16bb92a5_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_resignationletter
    ADD CONSTRAINT offboarding_resignat_created_by_id_16bb92a5_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_resignationletter offboarding_resignat_employee_id_id_2951a12b_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_resignationletter
    ADD CONSTRAINT offboarding_resignat_employee_id_id_2951a12b_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_resignationletter offboarding_resignat_modified_by_id_7b981cef_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_resignationletter
    ADD CONSTRAINT offboarding_resignat_modified_by_id_7b981cef_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: offboarding_resignationletter offboarding_resignat_offboarding_employee_a1772643_fk_offboardi; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.offboarding_resignationletter
    ADD CONSTRAINT offboarding_resignat_offboarding_employee_a1772643_fk_offboardi FOREIGN KEY (offboarding_employee_id_id) REFERENCES public.offboarding_offboardingemployee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_candidatestage onboarding_candidate_candidate_id_id_6e87ed65_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_candidatestage
    ADD CONSTRAINT onboarding_candidate_candidate_id_id_6e87ed65_fk_recruitme FOREIGN KEY (candidate_id_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_candidatetask onboarding_candidate_candidate_id_id_8b0eef2b_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_candidatetask
    ADD CONSTRAINT onboarding_candidate_candidate_id_id_8b0eef2b_fk_recruitme FOREIGN KEY (candidate_id_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_candidatestage onboarding_candidate_created_by_id_778bf760_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_candidatestage
    ADD CONSTRAINT onboarding_candidate_created_by_id_778bf760_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_candidatestage onboarding_candidate_modified_by_id_036edc7f_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_candidatestage
    ADD CONSTRAINT onboarding_candidate_modified_by_id_036edc7f_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_candidatetask onboarding_candidate_modified_by_id_c15234a2_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_candidatetask
    ADD CONSTRAINT onboarding_candidate_modified_by_id_c15234a2_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_candidatestage onboarding_candidate_onboarding_stage_id__477080f9_fk_onboardin; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_candidatestage
    ADD CONSTRAINT onboarding_candidate_onboarding_stage_id__477080f9_fk_onboardin FOREIGN KEY (onboarding_stage_id_id) REFERENCES public.onboarding_onboardingstage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_candidatetask onboarding_candidate_onboarding_task_id_i_66c5c3d8_fk_onboardin; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_candidatetask
    ADD CONSTRAINT onboarding_candidate_onboarding_task_id_i_66c5c3d8_fk_onboardin FOREIGN KEY (onboarding_task_id_id) REFERENCES public.onboarding_onboardingtask(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_candidatetask onboarding_candidate_stage_id_id_2bc5e4af_fk_onboardin; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_candidatetask
    ADD CONSTRAINT onboarding_candidate_stage_id_id_2bc5e4af_fk_onboardin FOREIGN KEY (stage_id_id) REFERENCES public.onboarding_onboardingstage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_candidatetask onboarding_candidatetask_created_by_id_e16f0e0b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_candidatetask
    ADD CONSTRAINT onboarding_candidatetask_created_by_id_e16f0e0b_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_historicalcandidatetask_history_tags onboarding_historica_audittag_id_032900d1_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_historicalcandidatetask_history_tags
    ADD CONSTRAINT onboarding_historica_audittag_id_032900d1_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_historicalcandidatetask_history_tags onboarding_historica_historicalcandidatet_f452cc88_fk_onboardin; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_historicalcandidatetask_history_tags
    ADD CONSTRAINT onboarding_historica_historicalcandidatet_f452cc88_fk_onboardin FOREIGN KEY (historicalcandidatetask_id) REFERENCES public.onboarding_historicalcandidatetask(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_historicalcandidatetask onboarding_historica_history_user_id_a7e8bdf9_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_historicalcandidatetask
    ADD CONSTRAINT onboarding_historica_history_user_id_a7e8bdf9_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingtask_candidates onboarding_onboardin_candidate_id_a2ad84c1_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingtask_candidates
    ADD CONSTRAINT onboarding_onboardin_candidate_id_a2ad84c1_fk_recruitme FOREIGN KEY (candidate_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingportal onboarding_onboardin_candidate_id_id_bdde0e05_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingportal
    ADD CONSTRAINT onboarding_onboardin_candidate_id_id_bdde0e05_fk_recruitme FOREIGN KEY (candidate_id_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingstage onboarding_onboardin_created_by_id_025988ab_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingstage
    ADD CONSTRAINT onboarding_onboardin_created_by_id_025988ab_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingportal onboarding_onboardin_created_by_id_c9caa2a3_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingportal
    ADD CONSTRAINT onboarding_onboardin_created_by_id_c9caa2a3_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingtask onboarding_onboardin_created_by_id_cb6060a7_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingtask
    ADD CONSTRAINT onboarding_onboardin_created_by_id_cb6060a7_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingtask_employee_id onboarding_onboardin_employee_id_6e59c408_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingtask_employee_id
    ADD CONSTRAINT onboarding_onboardin_employee_id_6e59c408_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingstage_employee_id onboarding_onboardin_employee_id_a941974c_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingstage_employee_id
    ADD CONSTRAINT onboarding_onboardin_employee_id_a941974c_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingtask onboarding_onboardin_modified_by_id_a4de5468_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingtask
    ADD CONSTRAINT onboarding_onboardin_modified_by_id_a4de5468_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingportal onboarding_onboardin_modified_by_id_b6ad8806_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingportal
    ADD CONSTRAINT onboarding_onboardin_modified_by_id_b6ad8806_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingstage onboarding_onboardin_modified_by_id_c77bd25e_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingstage
    ADD CONSTRAINT onboarding_onboardin_modified_by_id_c77bd25e_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingstage_employee_id onboarding_onboardin_onboardingstage_id_5afa9618_fk_onboardin; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingstage_employee_id
    ADD CONSTRAINT onboarding_onboardin_onboardingstage_id_5afa9618_fk_onboardin FOREIGN KEY (onboardingstage_id) REFERENCES public.onboarding_onboardingstage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingtask_candidates onboarding_onboardin_onboardingtask_id_19de8041_fk_onboardin; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingtask_candidates
    ADD CONSTRAINT onboarding_onboardin_onboardingtask_id_19de8041_fk_onboardin FOREIGN KEY (onboardingtask_id) REFERENCES public.onboarding_onboardingtask(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingtask_employee_id onboarding_onboardin_onboardingtask_id_55b23efb_fk_onboardin; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingtask_employee_id
    ADD CONSTRAINT onboarding_onboardin_onboardingtask_id_55b23efb_fk_onboardin FOREIGN KEY (onboardingtask_id) REFERENCES public.onboarding_onboardingtask(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingstage onboarding_onboardin_recruitment_id_id_d1f224a7_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingstage
    ADD CONSTRAINT onboarding_onboardin_recruitment_id_id_d1f224a7_fk_recruitme FOREIGN KEY (recruitment_id_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: onboarding_onboardingtask onboarding_onboardin_stage_id_id_9360b93d_fk_onboardin; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.onboarding_onboardingtask
    ADD CONSTRAINT onboarding_onboardin_stage_id_id_9360b93d_fk_onboardin FOREIGN KEY (stage_id_id) REFERENCES public.onboarding_onboardingstage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance payroll_allowance_company_id_id_5912bfe7_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance
    ADD CONSTRAINT payroll_allowance_company_id_id_5912bfe7_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance payroll_allowance_created_by_id_1c73f9ba_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance
    ADD CONSTRAINT payroll_allowance_created_by_id_1c73f9ba_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance_exclude_employees payroll_allowance_ex_allowance_id_71401ad3_fk_payroll_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance_exclude_employees
    ADD CONSTRAINT payroll_allowance_ex_allowance_id_71401ad3_fk_payroll_a FOREIGN KEY (allowance_id) REFERENCES public.payroll_allowance(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance_exclude_employees payroll_allowance_ex_employee_id_aa853e81_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance_exclude_employees
    ADD CONSTRAINT payroll_allowance_ex_employee_id_aa853e81_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance payroll_allowance_modified_by_id_947a87fd_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance
    ADD CONSTRAINT payroll_allowance_modified_by_id_947a87fd_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance_other_conditions payroll_allowance_ot_allowance_id_91385ebf_fk_payroll_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance_other_conditions
    ADD CONSTRAINT payroll_allowance_ot_allowance_id_91385ebf_fk_payroll_a FOREIGN KEY (allowance_id) REFERENCES public.payroll_allowance(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance_other_conditions payroll_allowance_ot_multiplecondition_id_c6d11700_fk_payroll_m; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance_other_conditions
    ADD CONSTRAINT payroll_allowance_ot_multiplecondition_id_c6d11700_fk_payroll_m FOREIGN KEY (multiplecondition_id) REFERENCES public.payroll_multiplecondition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance payroll_allowance_shift_id_id_2a990c10_fk_base_employeeshift_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance
    ADD CONSTRAINT payroll_allowance_shift_id_id_2a990c10_fk_base_employeeshift_id FOREIGN KEY (shift_id_id) REFERENCES public.base_employeeshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance_specific_employees payroll_allowance_sp_allowance_id_447cbbe6_fk_payroll_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance_specific_employees
    ADD CONSTRAINT payroll_allowance_sp_allowance_id_447cbbe6_fk_payroll_a FOREIGN KEY (allowance_id) REFERENCES public.payroll_allowance(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance_specific_employees payroll_allowance_sp_employee_id_8537de68_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance_specific_employees
    ADD CONSTRAINT payroll_allowance_sp_employee_id_8537de68_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_allowance payroll_allowance_work_type_id_id_da9a0d44_fk_base_worktype_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_allowance
    ADD CONSTRAINT payroll_allowance_work_type_id_id_da9a0d44_fk_base_worktype_id FOREIGN KEY (work_type_id_id) REFERENCES public.base_worktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_contract payroll_contract_created_by_id_40695d65_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_contract
    ADD CONSTRAINT payroll_contract_created_by_id_40695d65_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_contract payroll_contract_department_id_1ae8aa22_fk_base_department_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_contract
    ADD CONSTRAINT payroll_contract_department_id_1ae8aa22_fk_base_department_id FOREIGN KEY (department_id) REFERENCES public.base_department(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_contract payroll_contract_employee_id_id_73b14d20_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_contract
    ADD CONSTRAINT payroll_contract_employee_id_id_73b14d20_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_contract payroll_contract_filing_status_id_c62f4cc1_fk_payroll_f; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_contract
    ADD CONSTRAINT payroll_contract_filing_status_id_c62f4cc1_fk_payroll_f FOREIGN KEY (filing_status_id) REFERENCES public.payroll_filingstatus(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_contract payroll_contract_job_position_id_fa88268e_fk_base_jobp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_contract
    ADD CONSTRAINT payroll_contract_job_position_id_fa88268e_fk_base_jobp FOREIGN KEY (job_position_id) REFERENCES public.base_jobposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_contract payroll_contract_job_role_id_41e136e0_fk_base_jobrole_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_contract
    ADD CONSTRAINT payroll_contract_job_role_id_41e136e0_fk_base_jobrole_id FOREIGN KEY (job_role_id) REFERENCES public.base_jobrole(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_contract payroll_contract_modified_by_id_afd91aba_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_contract
    ADD CONSTRAINT payroll_contract_modified_by_id_afd91aba_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_contract payroll_contract_shift_id_eda88904_fk_base_employeeshift_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_contract
    ADD CONSTRAINT payroll_contract_shift_id_eda88904_fk_base_employeeshift_id FOREIGN KEY (shift_id) REFERENCES public.base_employeeshift(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_contract payroll_contract_work_type_id_82b0af54_fk_base_worktype_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_contract
    ADD CONSTRAINT payroll_contract_work_type_id_82b0af54_fk_base_worktype_id FOREIGN KEY (work_type_id) REFERENCES public.base_worktype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_deduction payroll_deduction_company_id_id_d5546b8f_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_deduction
    ADD CONSTRAINT payroll_deduction_company_id_id_d5546b8f_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_deduction payroll_deduction_created_by_id_433028c3_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_deduction
    ADD CONSTRAINT payroll_deduction_created_by_id_433028c3_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_deduction_exclude_employees payroll_deduction_ex_deduction_id_ab8324ba_fk_payroll_d; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_deduction_exclude_employees
    ADD CONSTRAINT payroll_deduction_ex_deduction_id_ab8324ba_fk_payroll_d FOREIGN KEY (deduction_id) REFERENCES public.payroll_deduction(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_deduction_exclude_employees payroll_deduction_ex_employee_id_f349f675_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_deduction_exclude_employees
    ADD CONSTRAINT payroll_deduction_ex_employee_id_f349f675_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_deduction payroll_deduction_modified_by_id_64c0dc3c_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_deduction
    ADD CONSTRAINT payroll_deduction_modified_by_id_64c0dc3c_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_deduction_other_conditions payroll_deduction_ot_deduction_id_a96fe1ab_fk_payroll_d; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_deduction_other_conditions
    ADD CONSTRAINT payroll_deduction_ot_deduction_id_a96fe1ab_fk_payroll_d FOREIGN KEY (deduction_id) REFERENCES public.payroll_deduction(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_deduction_other_conditions payroll_deduction_ot_multiplecondition_id_6f0081eb_fk_payroll_m; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_deduction_other_conditions
    ADD CONSTRAINT payroll_deduction_ot_multiplecondition_id_6f0081eb_fk_payroll_m FOREIGN KEY (multiplecondition_id) REFERENCES public.payroll_multiplecondition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_deduction_specific_employees payroll_deduction_sp_deduction_id_40142fb7_fk_payroll_d; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_deduction_specific_employees
    ADD CONSTRAINT payroll_deduction_sp_deduction_id_40142fb7_fk_payroll_d FOREIGN KEY (deduction_id) REFERENCES public.payroll_deduction(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_deduction_specific_employees payroll_deduction_sp_employee_id_5a7d19b7_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_deduction_specific_employees
    ADD CONSTRAINT payroll_deduction_sp_employee_id_5a7d19b7_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_filingstatus payroll_filingstatus_company_id_id_c4edc643_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_filingstatus
    ADD CONSTRAINT payroll_filingstatus_company_id_id_c4edc643_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_filingstatus payroll_filingstatus_created_by_id_1585912b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_filingstatus
    ADD CONSTRAINT payroll_filingstatus_created_by_id_1585912b_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_filingstatus payroll_filingstatus_modified_by_id_8ee36489_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_filingstatus
    ADD CONSTRAINT payroll_filingstatus_modified_by_id_8ee36489_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_historicalcontract_history_tags payroll_historicalco_audittag_id_ee2de581_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_historicalcontract_history_tags
    ADD CONSTRAINT payroll_historicalco_audittag_id_ee2de581_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_historicalcontract_history_tags payroll_historicalco_historicalcontract_i_ce51a07a_fk_payroll_h; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_historicalcontract_history_tags
    ADD CONSTRAINT payroll_historicalco_historicalcontract_i_ce51a07a_fk_payroll_h FOREIGN KEY (historicalcontract_id) REFERENCES public.payroll_historicalcontract(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_historicalcontract payroll_historicalco_history_user_id_60d308d1_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_historicalcontract
    ADD CONSTRAINT payroll_historicalco_history_user_id_60d308d1_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_historicalpayslip_history_tags payroll_historicalpa_audittag_id_92f1fdad_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_historicalpayslip_history_tags
    ADD CONSTRAINT payroll_historicalpa_audittag_id_92f1fdad_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_historicalpayslip_history_tags payroll_historicalpa_historicalpayslip_id_f12f5ff1_fk_payroll_h; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_historicalpayslip_history_tags
    ADD CONSTRAINT payroll_historicalpa_historicalpayslip_id_f12f5ff1_fk_payroll_h FOREIGN KEY (historicalpayslip_id) REFERENCES public.payroll_historicalpayslip(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_historicalpayslip payroll_historicalpa_history_user_id_5ca3658a_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_historicalpayslip
    ADD CONSTRAINT payroll_historicalpa_history_user_id_5ca3658a_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_loanaccount_deduction_ids payroll_loanaccount__deduction_id_1e7b9cf9_fk_payroll_d; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_loanaccount_deduction_ids
    ADD CONSTRAINT payroll_loanaccount__deduction_id_1e7b9cf9_fk_payroll_d FOREIGN KEY (deduction_id) REFERENCES public.payroll_deduction(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_loanaccount_deduction_ids payroll_loanaccount__loanaccount_id_f9fb1ae9_fk_payroll_l; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_loanaccount_deduction_ids
    ADD CONSTRAINT payroll_loanaccount__loanaccount_id_f9fb1ae9_fk_payroll_l FOREIGN KEY (loanaccount_id) REFERENCES public.payroll_loanaccount(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_loanaccount payroll_loanaccount_allowance_id_id_d01d19ed_fk_payroll_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_loanaccount
    ADD CONSTRAINT payroll_loanaccount_allowance_id_id_d01d19ed_fk_payroll_a FOREIGN KEY (allowance_id_id) REFERENCES public.payroll_allowance(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_loanaccount payroll_loanaccount_asset_id_id_b1a82434_fk_asset_asset_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_loanaccount
    ADD CONSTRAINT payroll_loanaccount_asset_id_id_b1a82434_fk_asset_asset_id FOREIGN KEY (asset_id_id) REFERENCES public.asset_asset(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_loanaccount payroll_loanaccount_created_by_id_c44cc155_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_loanaccount
    ADD CONSTRAINT payroll_loanaccount_created_by_id_c44cc155_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_loanaccount payroll_loanaccount_employee_id_id_aa0f9eef_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_loanaccount
    ADD CONSTRAINT payroll_loanaccount_employee_id_id_aa0f9eef_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_loanaccount payroll_loanaccount_modified_by_id_4b5d7154_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_loanaccount
    ADD CONSTRAINT payroll_loanaccount_modified_by_id_4b5d7154_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_overrideattendance payroll_overrideatte_attendance_ptr_id_99952b2e_fk_attendanc; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_overrideattendance
    ADD CONSTRAINT payroll_overrideatte_attendance_ptr_id_99952b2e_fk_attendanc FOREIGN KEY (attendance_ptr_id) REFERENCES public.attendance_attendance(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_overrideleaverequest payroll_overrideleav_leaverequest_ptr_id_cdbacfd3_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_overrideleaverequest
    ADD CONSTRAINT payroll_overrideleav_leaverequest_ptr_id_cdbacfd3_fk_leave_lea FOREIGN KEY (leaverequest_ptr_id) REFERENCES public.leave_leaverequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_payrollgeneralsetting payroll_payrollgener_company_id_id_e6427694_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_payrollgeneralsetting
    ADD CONSTRAINT payroll_payrollgener_company_id_id_e6427694_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_payrollsettings payroll_payrollsetti_company_id_id_d9a945a2_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_payrollsettings
    ADD CONSTRAINT payroll_payrollsetti_company_id_id_d9a945a2_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_payrollsettings payroll_payrollsettings_created_by_id_6b62d3c9_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_payrollsettings
    ADD CONSTRAINT payroll_payrollsettings_created_by_id_6b62d3c9_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_payrollsettings payroll_payrollsettings_modified_by_id_6c104a36_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_payrollsettings
    ADD CONSTRAINT payroll_payrollsettings_modified_by_id_6c104a36_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_payslip payroll_payslip_created_by_id_c32cd835_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_payslip
    ADD CONSTRAINT payroll_payslip_created_by_id_c32cd835_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_payslip payroll_payslip_employee_id_id_f7edc1cc_fk_employee_employee_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_payslip
    ADD CONSTRAINT payroll_payslip_employee_id_id_f7edc1cc_fk_employee_employee_id FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_payslip_installment_ids payroll_payslip_inst_deduction_id_6ac3f4ed_fk_payroll_d; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_payslip_installment_ids
    ADD CONSTRAINT payroll_payslip_inst_deduction_id_6ac3f4ed_fk_payroll_d FOREIGN KEY (deduction_id) REFERENCES public.payroll_deduction(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_payslip_installment_ids payroll_payslip_inst_payslip_id_6872c6c5_fk_payroll_p; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_payslip_installment_ids
    ADD CONSTRAINT payroll_payslip_inst_payslip_id_6872c6c5_fk_payroll_p FOREIGN KEY (payslip_id) REFERENCES public.payroll_payslip(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_payslip payroll_payslip_modified_by_id_7fe374ca_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_payslip
    ADD CONSTRAINT payroll_payslip_modified_by_id_7fe374ca_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_payslipautogenerate payroll_payslipautog_company_id_id_36b0c261_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_payslipautogenerate
    ADD CONSTRAINT payroll_payslipautog_company_id_id_36b0c261_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursement payroll_reimbursemen_allowance_id_id_d4869beb_fk_payroll_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursement
    ADD CONSTRAINT payroll_reimbursemen_allowance_id_id_d4869beb_fk_payroll_a FOREIGN KEY (allowance_id_id) REFERENCES public.payroll_allowance(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursement payroll_reimbursemen_approved_by_id_a5077a7b_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursement
    ADD CONSTRAINT payroll_reimbursemen_approved_by_id_a5077a7b_fk_employee_ FOREIGN KEY (approved_by_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursementrequestcomment payroll_reimbursemen_created_by_id_bd8f0ee7_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursementrequestcomment
    ADD CONSTRAINT payroll_reimbursemen_created_by_id_bd8f0ee7_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursementrequestcomment payroll_reimbursemen_employee_id_id_b1ed852c_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursementrequestcomment
    ADD CONSTRAINT payroll_reimbursemen_employee_id_id_b1ed852c_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursement payroll_reimbursemen_employee_id_id_caaaa190_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursement
    ADD CONSTRAINT payroll_reimbursemen_employee_id_id_caaaa190_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursement payroll_reimbursemen_leave_type_id_id_827b2717_fk_leave_lea; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursement
    ADD CONSTRAINT payroll_reimbursemen_leave_type_id_id_827b2717_fk_leave_lea FOREIGN KEY (leave_type_id_id) REFERENCES public.leave_leavetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursementrequestcomment payroll_reimbursemen_modified_by_id_00a981b9_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursementrequestcomment
    ADD CONSTRAINT payroll_reimbursemen_modified_by_id_00a981b9_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursement_other_attachments payroll_reimbursemen_reimbursement_id_0a9e691e_fk_payroll_r; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursement_other_attachments
    ADD CONSTRAINT payroll_reimbursemen_reimbursement_id_0a9e691e_fk_payroll_r FOREIGN KEY (reimbursement_id) REFERENCES public.payroll_reimbursement(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursementrequestcomment_files payroll_reimbursemen_reimbursementfile_id_346a9b2b_fk_payroll_r; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursementrequestcomment_files
    ADD CONSTRAINT payroll_reimbursemen_reimbursementfile_id_346a9b2b_fk_payroll_r FOREIGN KEY (reimbursementfile_id) REFERENCES public.payroll_reimbursementfile(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursement_other_attachments payroll_reimbursemen_reimbursementmultipl_bb6e8ac8_fk_payroll_r; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursement_other_attachments
    ADD CONSTRAINT payroll_reimbursemen_reimbursementmultipl_bb6e8ac8_fk_payroll_r FOREIGN KEY (reimbursementmultipleattachment_id) REFERENCES public.payroll_reimbursementmultipleattachment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursementrequestcomment_files payroll_reimbursemen_reimbursementrequest_a8d8524d_fk_payroll_r; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursementrequestcomment_files
    ADD CONSTRAINT payroll_reimbursemen_reimbursementrequest_a8d8524d_fk_payroll_r FOREIGN KEY (reimbursementrequestcomment_id) REFERENCES public.payroll_reimbursementrequestcomment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursementrequestcomment payroll_reimbursemen_request_id_id_c5248113_fk_payroll_r; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursementrequestcomment
    ADD CONSTRAINT payroll_reimbursemen_request_id_id_c5248113_fk_payroll_r FOREIGN KEY (request_id_id) REFERENCES public.payroll_reimbursement(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursement payroll_reimbursement_created_by_id_faf47a67_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursement
    ADD CONSTRAINT payroll_reimbursement_created_by_id_faf47a67_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_reimbursement payroll_reimbursement_modified_by_id_68fe469f_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_reimbursement
    ADD CONSTRAINT payroll_reimbursement_modified_by_id_68fe469f_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_taxbracket payroll_taxbracket_created_by_id_9debe17b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_taxbracket
    ADD CONSTRAINT payroll_taxbracket_created_by_id_9debe17b_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_taxbracket payroll_taxbracket_filing_status_id_id_44db05c3_fk_payroll_f; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_taxbracket
    ADD CONSTRAINT payroll_taxbracket_filing_status_id_id_44db05c3_fk_payroll_f FOREIGN KEY (filing_status_id_id) REFERENCES public.payroll_filingstatus(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_taxbracket payroll_taxbracket_modified_by_id_975491eb_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_taxbracket
    ADD CONSTRAINT payroll_taxbracket_modified_by_id_975491eb_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: payroll_workrecord payroll_workrecord_employee_id_id_193463e2_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.payroll_workrecord
    ADD CONSTRAINT payroll_workrecord_employee_id_id_193463e2_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_anonymousfeedback pms_anonymousfeedbac_department_id_id_224e48aa_fk_base_depa; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_anonymousfeedback
    ADD CONSTRAINT pms_anonymousfeedbac_department_id_id_224e48aa_fk_base_depa FOREIGN KEY (department_id_id) REFERENCES public.base_department(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_anonymousfeedback pms_anonymousfeedbac_employee_id_id_b4c009d4_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_anonymousfeedback
    ADD CONSTRAINT pms_anonymousfeedbac_employee_id_id_b4c009d4_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_anonymousfeedback pms_anonymousfeedbac_job_position_id_id_da5ab018_fk_base_jobp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_anonymousfeedback
    ADD CONSTRAINT pms_anonymousfeedbac_job_position_id_id_da5ab018_fk_base_jobp FOREIGN KEY (job_position_id_id) REFERENCES public.base_jobposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_answer pms_answer_employee_id_id_4daf966e_fk_employee_employee_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_answer
    ADD CONSTRAINT pms_answer_employee_id_id_4daf966e_fk_employee_employee_id FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_answer pms_answer_feedback_id_id_bf251b00_fk_pms_feedback_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_answer
    ADD CONSTRAINT pms_answer_feedback_id_id_bf251b00_fk_pms_feedback_id FOREIGN KEY (feedback_id_id) REFERENCES public.pms_feedback(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_answer pms_answer_question_id_id_2f05562f_fk_pms_question_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_answer
    ADD CONSTRAINT pms_answer_question_id_id_2f05562f_fk_pms_question_id FOREIGN KEY (question_id_id) REFERENCES public.pms_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_comment pms_comment_employee_id_id_b77179f3_fk_employee_employee_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_comment
    ADD CONSTRAINT pms_comment_employee_id_id_b77179f3_fk_employee_employee_id FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_comment pms_comment_employee_objective_i_6d8ce4f2_fk_pms_emplo; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_comment
    ADD CONSTRAINT pms_comment_employee_objective_i_6d8ce4f2_fk_pms_emplo FOREIGN KEY (employee_objective_id_id) REFERENCES public.pms_employeeobjective(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeebonuspoint pms_employeebonuspoi_bonus_point_id_id_e34f3f54_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeebonuspoint
    ADD CONSTRAINT pms_employeebonuspoi_bonus_point_id_id_e34f3f54_fk_employee_ FOREIGN KEY (bonus_point_id_id) REFERENCES public.employee_bonuspoint(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeebonuspoint pms_employeebonuspoi_employee_id_id_94211f70_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeebonuspoint
    ADD CONSTRAINT pms_employeebonuspoi_employee_id_id_94211f70_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeebonuspoint pms_employeebonuspoint_created_by_id_544d2b68_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeebonuspoint
    ADD CONSTRAINT pms_employeebonuspoint_created_by_id_544d2b68_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeebonuspoint pms_employeebonuspoint_modified_by_id_23badb59_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeebonuspoint
    ADD CONSTRAINT pms_employeebonuspoint_modified_by_id_23badb59_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeekeyresult pms_employeekeyresul_employee_objective_i_f0bbcd7f_fk_pms_emplo; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeekeyresult
    ADD CONSTRAINT pms_employeekeyresul_employee_objective_i_f0bbcd7f_fk_pms_emplo FOREIGN KEY (employee_objective_id_id) REFERENCES public.pms_employeeobjective(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeekeyresult pms_employeekeyresul_key_result_id_id_78770afe_fk_pms_keyre; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeekeyresult
    ADD CONSTRAINT pms_employeekeyresul_key_result_id_id_78770afe_fk_pms_keyre FOREIGN KEY (key_result_id_id) REFERENCES public.pms_keyresult(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeeobjective pms_employeeobjectiv_employee_id_id_15ddf5ea_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeeobjective
    ADD CONSTRAINT pms_employeeobjectiv_employee_id_id_15ddf5ea_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeeobjective_key_result_id pms_employeeobjectiv_employeeobjective_id_2f7a1ea5_fk_pms_emplo; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeeobjective_key_result_id
    ADD CONSTRAINT pms_employeeobjectiv_employeeobjective_id_2f7a1ea5_fk_pms_emplo FOREIGN KEY (employeeobjective_id) REFERENCES public.pms_employeeobjective(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeeobjective_key_result_id pms_employeeobjectiv_keyresult_id_0561edce_fk_pms_keyre; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeeobjective_key_result_id
    ADD CONSTRAINT pms_employeeobjectiv_keyresult_id_0561edce_fk_pms_keyre FOREIGN KEY (keyresult_id) REFERENCES public.pms_keyresult(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeeobjective pms_employeeobjectiv_objective_id_id_ee2ed9a2_fk_pms_objec; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeeobjective
    ADD CONSTRAINT pms_employeeobjectiv_objective_id_id_ee2ed9a2_fk_pms_objec FOREIGN KEY (objective_id_id) REFERENCES public.pms_objective(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeeobjective pms_employeeobjective_created_by_id_7f721659_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeeobjective
    ADD CONSTRAINT pms_employeeobjective_created_by_id_7f721659_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_employeeobjective pms_employeeobjective_modified_by_id_e64ba2f4_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_employeeobjective
    ADD CONSTRAINT pms_employeeobjective_modified_by_id_e64ba2f4_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback_colleague_id pms_feedback_colleag_employee_id_929c106e_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback_colleague_id
    ADD CONSTRAINT pms_feedback_colleag_employee_id_929c106e_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback_colleague_id pms_feedback_colleag_feedback_id_5f17190a_fk_pms_feedb; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback_colleague_id
    ADD CONSTRAINT pms_feedback_colleag_feedback_id_5f17190a_fk_pms_feedb FOREIGN KEY (feedback_id) REFERENCES public.pms_feedback(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback pms_feedback_created_by_id_5fc4765b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback
    ADD CONSTRAINT pms_feedback_created_by_id_5fc4765b_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback_employee_key_results_id pms_feedback_employe_employeekeyresult_id_04a18d62_fk_pms_emplo; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback_employee_key_results_id
    ADD CONSTRAINT pms_feedback_employe_employeekeyresult_id_04a18d62_fk_pms_emplo FOREIGN KEY (employeekeyresult_id) REFERENCES public.pms_employeekeyresult(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback_employee_key_results_id pms_feedback_employe_feedback_id_2e148291_fk_pms_feedb; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback_employee_key_results_id
    ADD CONSTRAINT pms_feedback_employe_feedback_id_2e148291_fk_pms_feedb FOREIGN KEY (feedback_id) REFERENCES public.pms_feedback(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback pms_feedback_employee_id_id_fc981583_fk_employee_employee_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback
    ADD CONSTRAINT pms_feedback_employee_id_id_fc981583_fk_employee_employee_id FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback pms_feedback_manager_id_id_29e8eaa1_fk_employee_employee_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback
    ADD CONSTRAINT pms_feedback_manager_id_id_29e8eaa1_fk_employee_employee_id FOREIGN KEY (manager_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback pms_feedback_modified_by_id_2d8fa73a_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback
    ADD CONSTRAINT pms_feedback_modified_by_id_2d8fa73a_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback_others_id pms_feedback_others__employee_id_975b0597_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback_others_id
    ADD CONSTRAINT pms_feedback_others__employee_id_975b0597_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback_others_id pms_feedback_others_id_feedback_id_b9dde79a_fk_pms_feedback_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback_others_id
    ADD CONSTRAINT pms_feedback_others_id_feedback_id_b9dde79a_fk_pms_feedback_id FOREIGN KEY (feedback_id) REFERENCES public.pms_feedback(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback pms_feedback_question_template_id_55891304_fk_pms_quest; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback
    ADD CONSTRAINT pms_feedback_question_template_id_55891304_fk_pms_quest FOREIGN KEY (question_template_id_id) REFERENCES public.pms_questiontemplate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback_subordinate_id pms_feedback_subordi_employee_id_0eff7b1a_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback_subordinate_id
    ADD CONSTRAINT pms_feedback_subordi_employee_id_0eff7b1a_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_feedback_subordinate_id pms_feedback_subordi_feedback_id_cd0bc731_fk_pms_feedb; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_feedback_subordinate_id
    ADD CONSTRAINT pms_feedback_subordi_feedback_id_cd0bc731_fk_pms_feedb FOREIGN KEY (feedback_id) REFERENCES public.pms_feedback(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalcomment_history_tags pms_historicalcommen_audittag_id_8a327b8b_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalcomment_history_tags
    ADD CONSTRAINT pms_historicalcommen_audittag_id_8a327b8b_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalcomment_history_tags pms_historicalcommen_historicalcomment_id_7a748c3e_fk_pms_histo; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalcomment_history_tags
    ADD CONSTRAINT pms_historicalcommen_historicalcomment_id_7a748c3e_fk_pms_histo FOREIGN KEY (historicalcomment_id) REFERENCES public.pms_historicalcomment(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalcomment pms_historicalcomment_history_user_id_105b2495_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalcomment
    ADD CONSTRAINT pms_historicalcomment_history_user_id_105b2495_fk_auth_user_id FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalemployeeobjective_history_tags pms_historicalemploy_audittag_id_1910337f_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalemployeeobjective_history_tags
    ADD CONSTRAINT pms_historicalemploy_audittag_id_1910337f_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalemployeekeyresult_history_tags pms_historicalemploy_audittag_id_782b2bab_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalemployeekeyresult_history_tags
    ADD CONSTRAINT pms_historicalemploy_audittag_id_782b2bab_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalemployeekeyresult_history_tags pms_historicalemploy_historicalemployeeke_39756650_fk_pms_histo; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalemployeekeyresult_history_tags
    ADD CONSTRAINT pms_historicalemploy_historicalemployeeke_39756650_fk_pms_histo FOREIGN KEY (historicalemployeekeyresult_id) REFERENCES public.pms_historicalemployeekeyresult(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalemployeeobjective_history_tags pms_historicalemploy_historicalemployeeob_cee862a5_fk_pms_histo; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalemployeeobjective_history_tags
    ADD CONSTRAINT pms_historicalemploy_historicalemployeeob_cee862a5_fk_pms_histo FOREIGN KEY (historicalemployeeobjective_id) REFERENCES public.pms_historicalemployeeobjective(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalemployeekeyresult pms_historicalemploy_history_user_id_27036f6a_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalemployeekeyresult
    ADD CONSTRAINT pms_historicalemploy_history_user_id_27036f6a_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalemployeeobjective pms_historicalemploy_history_user_id_e6a4deea_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalemployeeobjective
    ADD CONSTRAINT pms_historicalemploy_history_user_id_e6a4deea_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalkeyresult_history_tags pms_historicalkeyres_audittag_id_4f7451ad_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalkeyresult_history_tags
    ADD CONSTRAINT pms_historicalkeyres_audittag_id_4f7451ad_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalkeyresult_history_tags pms_historicalkeyres_historicalkeyresult__e3104884_fk_pms_histo; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalkeyresult_history_tags
    ADD CONSTRAINT pms_historicalkeyres_historicalkeyresult__e3104884_fk_pms_histo FOREIGN KEY (historicalkeyresult_id) REFERENCES public.pms_historicalkeyresult(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalkeyresult pms_historicalkeyres_history_user_id_252d47dc_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalkeyresult
    ADD CONSTRAINT pms_historicalkeyres_history_user_id_252d47dc_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalobjective_history_tags pms_historicalobject_audittag_id_bfa7c78c_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalobjective_history_tags
    ADD CONSTRAINT pms_historicalobject_audittag_id_bfa7c78c_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalobjective_history_tags pms_historicalobject_historicalobjective__5ca7029b_fk_pms_histo; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalobjective_history_tags
    ADD CONSTRAINT pms_historicalobject_historicalobjective__5ca7029b_fk_pms_histo FOREIGN KEY (historicalobjective_id) REFERENCES public.pms_historicalobjective(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_historicalobjective pms_historicalobject_history_user_id_39aa8815_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_historicalobjective
    ADD CONSTRAINT pms_historicalobject_history_user_id_39aa8815_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_keyresult pms_keyresult_company_id_id_aba9e43b_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_keyresult
    ADD CONSTRAINT pms_keyresult_company_id_id_aba9e43b_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_keyresult pms_keyresult_created_by_id_610bc0d5_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_keyresult
    ADD CONSTRAINT pms_keyresult_created_by_id_610bc0d5_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_keyresult pms_keyresult_modified_by_id_fb402cf1_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_keyresult
    ADD CONSTRAINT pms_keyresult_modified_by_id_fb402cf1_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_keyresultfeedback pms_keyresultfeedbac_employee_id_id_c7a3a640_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_keyresultfeedback
    ADD CONSTRAINT pms_keyresultfeedbac_employee_id_id_c7a3a640_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_keyresultfeedback pms_keyresultfeedbac_feedback_id_id_0e5351b6_fk_pms_feedb; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_keyresultfeedback
    ADD CONSTRAINT pms_keyresultfeedbac_feedback_id_id_0e5351b6_fk_pms_feedb FOREIGN KEY (feedback_id_id) REFERENCES public.pms_feedback(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_keyresultfeedback pms_keyresultfeedbac_key_result_id_id_a48b7226_fk_pms_emplo; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_keyresultfeedback
    ADD CONSTRAINT pms_keyresultfeedbac_key_result_id_id_a48b7226_fk_pms_emplo FOREIGN KEY (key_result_id_id) REFERENCES public.pms_employeekeyresult(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetings_answer_employees pms_meetings_answer__employee_id_770d488c_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetings_answer_employees
    ADD CONSTRAINT pms_meetings_answer__employee_id_770d488c_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetings_answer_employees pms_meetings_answer__meetings_id_241405c7_fk_pms_meeti; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetings_answer_employees
    ADD CONSTRAINT pms_meetings_answer__meetings_id_241405c7_fk_pms_meeti FOREIGN KEY (meetings_id) REFERENCES public.pms_meetings(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetings pms_meetings_company_id_id_2e4b7ae7_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetings
    ADD CONSTRAINT pms_meetings_company_id_id_2e4b7ae7_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetings pms_meetings_created_by_id_a66016da_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetings
    ADD CONSTRAINT pms_meetings_created_by_id_a66016da_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetings_employee_id pms_meetings_employe_employee_id_31298146_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetings_employee_id
    ADD CONSTRAINT pms_meetings_employe_employee_id_31298146_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetings_employee_id pms_meetings_employe_meetings_id_afe63fe0_fk_pms_meeti; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetings_employee_id
    ADD CONSTRAINT pms_meetings_employe_meetings_id_afe63fe0_fk_pms_meeti FOREIGN KEY (meetings_id) REFERENCES public.pms_meetings(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetings_manager pms_meetings_manager_employee_id_66475189_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetings_manager
    ADD CONSTRAINT pms_meetings_manager_employee_id_66475189_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetings_manager pms_meetings_manager_meetings_id_477de095_fk_pms_meetings_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetings_manager
    ADD CONSTRAINT pms_meetings_manager_meetings_id_477de095_fk_pms_meetings_id FOREIGN KEY (meetings_id) REFERENCES public.pms_meetings(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetings pms_meetings_modified_by_id_f4f4f4bf_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetings
    ADD CONSTRAINT pms_meetings_modified_by_id_f4f4f4bf_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetings pms_meetings_question_template_id_4c5c155d_fk_pms_quest; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetings
    ADD CONSTRAINT pms_meetings_question_template_id_4c5c155d_fk_pms_quest FOREIGN KEY (question_template_id) REFERENCES public.pms_questiontemplate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetingsanswer pms_meetingsanswer_employee_id_id_b151c6cb_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetingsanswer
    ADD CONSTRAINT pms_meetingsanswer_employee_id_id_b151c6cb_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetingsanswer pms_meetingsanswer_meeting_id_id_68d8343e_fk_pms_meetings_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetingsanswer
    ADD CONSTRAINT pms_meetingsanswer_meeting_id_id_68d8343e_fk_pms_meetings_id FOREIGN KEY (meeting_id_id) REFERENCES public.pms_meetings(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_meetingsanswer pms_meetingsanswer_question_id_id_d07fab0f_fk_pms_question_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_meetingsanswer
    ADD CONSTRAINT pms_meetingsanswer_question_id_id_d07fab0f_fk_pms_question_id FOREIGN KEY (question_id_id) REFERENCES public.pms_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_objective_assignees pms_objective_assign_employee_id_1cf59cf6_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_objective_assignees
    ADD CONSTRAINT pms_objective_assign_employee_id_1cf59cf6_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_objective_assignees pms_objective_assign_objective_id_f28c7dd3_fk_pms_objec; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_objective_assignees
    ADD CONSTRAINT pms_objective_assign_objective_id_f28c7dd3_fk_pms_objec FOREIGN KEY (objective_id) REFERENCES public.pms_objective(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_objective pms_objective_company_id_id_4df6f8ca_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_objective
    ADD CONSTRAINT pms_objective_company_id_id_4df6f8ca_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_objective pms_objective_created_by_id_d0943a41_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_objective
    ADD CONSTRAINT pms_objective_created_by_id_d0943a41_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_objective_key_result_id pms_objective_key_re_keyresult_id_6fd630ee_fk_pms_keyre; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_objective_key_result_id
    ADD CONSTRAINT pms_objective_key_re_keyresult_id_6fd630ee_fk_pms_keyre FOREIGN KEY (keyresult_id) REFERENCES public.pms_keyresult(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_objective_key_result_id pms_objective_key_re_objective_id_e5bfede7_fk_pms_objec; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_objective_key_result_id
    ADD CONSTRAINT pms_objective_key_re_objective_id_e5bfede7_fk_pms_objec FOREIGN KEY (objective_id) REFERENCES public.pms_objective(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_objective_managers pms_objective_manage_employee_id_ff9ec02e_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_objective_managers
    ADD CONSTRAINT pms_objective_manage_employee_id_ff9ec02e_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_objective_managers pms_objective_manage_objective_id_c30c1375_fk_pms_objec; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_objective_managers
    ADD CONSTRAINT pms_objective_manage_objective_id_c30c1375_fk_pms_objec FOREIGN KEY (objective_id) REFERENCES public.pms_objective(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_objective pms_objective_modified_by_id_fc79eb66_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_objective
    ADD CONSTRAINT pms_objective_modified_by_id_fc79eb66_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_period_company_id pms_period_company_id_company_id_5fa497bf_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_period_company_id
    ADD CONSTRAINT pms_period_company_id_company_id_5fa497bf_fk_base_company_id FOREIGN KEY (company_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_period_company_id pms_period_company_id_period_id_66f72252_fk_pms_period_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_period_company_id
    ADD CONSTRAINT pms_period_company_id_period_id_66f72252_fk_pms_period_id FOREIGN KEY (period_id) REFERENCES public.pms_period(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_period pms_period_created_by_id_27961755_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_period
    ADD CONSTRAINT pms_period_created_by_id_27961755_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_period pms_period_modified_by_id_6b790b4d_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_period
    ADD CONSTRAINT pms_period_modified_by_id_6b790b4d_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_question pms_question_created_by_id_2ac15bc5_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_question
    ADD CONSTRAINT pms_question_created_by_id_2ac15bc5_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_question pms_question_modified_by_id_a7ba6fec_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_question
    ADD CONSTRAINT pms_question_modified_by_id_a7ba6fec_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_question pms_question_template_id_id_1d81b86c_fk_pms_questiontemplate_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_question
    ADD CONSTRAINT pms_question_template_id_id_1d81b86c_fk_pms_questiontemplate_id FOREIGN KEY (template_id_id) REFERENCES public.pms_questiontemplate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_questionoptions pms_questionoptions_created_by_id_18690141_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_questionoptions
    ADD CONSTRAINT pms_questionoptions_created_by_id_18690141_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_questionoptions pms_questionoptions_modified_by_id_4278dd85_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_questionoptions
    ADD CONSTRAINT pms_questionoptions_modified_by_id_4278dd85_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_questionoptions pms_questionoptions_question_id_id_79cd1205_fk_pms_question_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_questionoptions
    ADD CONSTRAINT pms_questionoptions_question_id_id_79cd1205_fk_pms_question_id FOREIGN KEY (question_id_id) REFERENCES public.pms_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_questiontemplate_company_id pms_questiontemplate_company_id_648e075d_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_questiontemplate_company_id
    ADD CONSTRAINT pms_questiontemplate_company_id_648e075d_fk_base_comp FOREIGN KEY (company_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_questiontemplate pms_questiontemplate_created_by_id_d6911099_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_questiontemplate
    ADD CONSTRAINT pms_questiontemplate_created_by_id_d6911099_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_questiontemplate pms_questiontemplate_modified_by_id_b47b4f16_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_questiontemplate
    ADD CONSTRAINT pms_questiontemplate_modified_by_id_b47b4f16_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pms_questiontemplate_company_id pms_questiontemplate_questiontemplate_id_8b4847bb_fk_pms_quest; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.pms_questiontemplate_company_id
    ADD CONSTRAINT pms_questiontemplate_questiontemplate_id_8b4847bb_fk_pms_quest FOREIGN KEY (questiontemplate_id) REFERENCES public.pms_questiontemplate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_project project_project_company_id_id_3b541f4d_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_project
    ADD CONSTRAINT project_project_company_id_id_3b541f4d_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_project project_project_created_by_id_b4ef8dd6_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_project
    ADD CONSTRAINT project_project_created_by_id_b4ef8dd6_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_project_managers project_project_mana_employee_id_52eccea8_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_project_managers
    ADD CONSTRAINT project_project_mana_employee_id_52eccea8_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_project_managers project_project_mana_project_id_c8ee4c70_fk_project_p; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_project_managers
    ADD CONSTRAINT project_project_mana_project_id_c8ee4c70_fk_project_p FOREIGN KEY (project_id) REFERENCES public.project_project(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_project_members project_project_memb_employee_id_6236dc25_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_project_members
    ADD CONSTRAINT project_project_memb_employee_id_6236dc25_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_project_members project_project_memb_project_id_0c0a7146_fk_project_p; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_project_members
    ADD CONSTRAINT project_project_memb_project_id_0c0a7146_fk_project_p FOREIGN KEY (project_id) REFERENCES public.project_project(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_project project_project_modified_by_id_b07be181_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_project
    ADD CONSTRAINT project_project_modified_by_id_b07be181_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_projectstage project_projectstage_created_by_id_8031fcea_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_projectstage
    ADD CONSTRAINT project_projectstage_created_by_id_8031fcea_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_projectstage project_projectstage_modified_by_id_b3fddb64_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_projectstage
    ADD CONSTRAINT project_projectstage_modified_by_id_b3fddb64_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_projectstage project_projectstage_project_id_9b915412_fk_project_project_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_projectstage
    ADD CONSTRAINT project_projectstage_project_id_9b915412_fk_project_project_id FOREIGN KEY (project_id) REFERENCES public.project_project(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_task project_task_created_by_id_21916daf_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_task
    ADD CONSTRAINT project_task_created_by_id_21916daf_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_task project_task_modified_by_id_106a7e44_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_task
    ADD CONSTRAINT project_task_modified_by_id_106a7e44_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_task project_task_project_id_a8ab06ac_fk_project_project_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_task
    ADD CONSTRAINT project_task_project_id_a8ab06ac_fk_project_project_id FOREIGN KEY (project_id) REFERENCES public.project_project(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_task project_task_stage_id_7333e419_fk_project_projectstage_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_task
    ADD CONSTRAINT project_task_stage_id_7333e419_fk_project_projectstage_id FOREIGN KEY (stage_id) REFERENCES public.project_projectstage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_task_task_managers project_task_task_ma_employee_id_d81f09bb_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_task_task_managers
    ADD CONSTRAINT project_task_task_ma_employee_id_d81f09bb_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_task_task_managers project_task_task_managers_task_id_fbc2c5a4_fk_project_task_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_task_task_managers
    ADD CONSTRAINT project_task_task_managers_task_id_fbc2c5a4_fk_project_task_id FOREIGN KEY (task_id) REFERENCES public.project_task(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_task_task_members project_task_task_me_employee_id_fbd97e5f_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_task_task_members
    ADD CONSTRAINT project_task_task_me_employee_id_fbd97e5f_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_task_task_members project_task_task_members_task_id_af91b467_fk_project_task_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_task_task_members
    ADD CONSTRAINT project_task_task_members_task_id_af91b467_fk_project_task_id FOREIGN KEY (task_id) REFERENCES public.project_task(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_timesheet project_timesheet_created_by_id_66f2f1be_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_timesheet
    ADD CONSTRAINT project_timesheet_created_by_id_66f2f1be_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_timesheet project_timesheet_employee_id_id_8774a71d_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_timesheet
    ADD CONSTRAINT project_timesheet_employee_id_id_8774a71d_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_timesheet project_timesheet_modified_by_id_8b8c57ba_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_timesheet
    ADD CONSTRAINT project_timesheet_modified_by_id_8b8c57ba_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_timesheet project_timesheet_project_id_id_daf90f6b_fk_project_project_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_timesheet
    ADD CONSTRAINT project_timesheet_project_id_id_daf90f6b_fk_project_project_id FOREIGN KEY (project_id_id) REFERENCES public.project_project(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: project_timesheet project_timesheet_task_id_id_88ed4e3c_fk_project_task_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.project_timesheet
    ADD CONSTRAINT project_timesheet_task_id_id_88ed4e3c_fk_project_task_id FOREIGN KEY (task_id_id) REFERENCES public.project_task(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidatedocumentrequest_candidate_id recruitment_candidat_candidate_id_aa0c35ed_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidatedocumentrequest_candidate_id
    ADD CONSTRAINT recruitment_candidat_candidate_id_aa0c35ed_fk_recruitme FOREIGN KEY (candidate_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidaterating recruitment_candidat_candidate_id_id_1ede0d1f_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidaterating
    ADD CONSTRAINT recruitment_candidat_candidate_id_id_1ede0d1f_fk_recruitme FOREIGN KEY (candidate_id_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidatedocument recruitment_candidat_candidate_id_id_e3f353e9_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidatedocument
    ADD CONSTRAINT recruitment_candidat_candidate_id_id_e3f353e9_fk_recruitme FOREIGN KEY (candidate_id_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidatedocumentrequest_candidate_id recruitment_candidat_candidatedocumentreq_58411ac1_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidatedocumentrequest_candidate_id
    ADD CONSTRAINT recruitment_candidat_candidatedocumentreq_58411ac1_fk_recruitme FOREIGN KEY (candidatedocumentrequest_id) REFERENCES public.recruitment_candidatedocumentrequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidate recruitment_candidat_converted_employee_i_aea3b89c_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidate
    ADD CONSTRAINT recruitment_candidat_converted_employee_i_aea3b89c_fk_employee_ FOREIGN KEY (converted_employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidaterating recruitment_candidat_created_by_id_0e9a4f8f_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidaterating
    ADD CONSTRAINT recruitment_candidat_created_by_id_0e9a4f8f_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidatedocumentrequest recruitment_candidat_created_by_id_9aff83cf_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidatedocumentrequest
    ADD CONSTRAINT recruitment_candidat_created_by_id_9aff83cf_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidatedocument recruitment_candidat_created_by_id_b99ad3d5_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidatedocument
    ADD CONSTRAINT recruitment_candidat_created_by_id_b99ad3d5_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidatedocument recruitment_candidat_document_request_id__f57b6648_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidatedocument
    ADD CONSTRAINT recruitment_candidat_document_request_id__f57b6648_fk_recruitme FOREIGN KEY (document_request_id_id) REFERENCES public.recruitment_candidatedocumentrequest(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidaterating recruitment_candidat_employee_id_id_aa90a5e3_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidaterating
    ADD CONSTRAINT recruitment_candidat_employee_id_id_aa90a5e3_fk_employee_ FOREIGN KEY (employee_id_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidate recruitment_candidat_job_position_id_id_6d554ae7_fk_base_jobp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidate
    ADD CONSTRAINT recruitment_candidat_job_position_id_id_6d554ae7_fk_base_jobp FOREIGN KEY (job_position_id_id) REFERENCES public.base_jobposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidatedocumentrequest recruitment_candidat_modified_by_id_0e961fa2_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidatedocumentrequest
    ADD CONSTRAINT recruitment_candidat_modified_by_id_0e961fa2_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidaterating recruitment_candidat_modified_by_id_3ab4f1fe_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidaterating
    ADD CONSTRAINT recruitment_candidat_modified_by_id_3ab4f1fe_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidatedocument recruitment_candidat_modified_by_id_bf50b147_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidatedocument
    ADD CONSTRAINT recruitment_candidat_modified_by_id_bf50b147_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidate recruitment_candidat_recruitment_id_id_3276947d_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidate
    ADD CONSTRAINT recruitment_candidat_recruitment_id_id_3276947d_fk_recruitme FOREIGN KEY (recruitment_id_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidate recruitment_candidat_referral_id_0aaff040_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidate
    ADD CONSTRAINT recruitment_candidat_referral_id_0aaff040_fk_employee_ FOREIGN KEY (referral_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidate recruitment_candidat_stage_id_id_95c8b982_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidate
    ADD CONSTRAINT recruitment_candidat_stage_id_id_95c8b982_fk_recruitme FOREIGN KEY (stage_id_id) REFERENCES public.recruitment_stage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidate recruitment_candidate_created_by_id_e66d3f8b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidate
    ADD CONSTRAINT recruitment_candidate_created_by_id_e66d3f8b_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_candidate recruitment_candidate_modified_by_id_ea175e4b_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_candidate
    ADD CONSTRAINT recruitment_candidate_modified_by_id_ea175e4b_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_historicalcandidate_history_tags recruitment_historic_audittag_id_18d229c0_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_historicalcandidate_history_tags
    ADD CONSTRAINT recruitment_historic_audittag_id_18d229c0_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_historicalrejectedcandidate_history_tags recruitment_historic_audittag_id_c5b10b47_fk_horilla_a; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_historicalrejectedcandidate_history_tags
    ADD CONSTRAINT recruitment_historic_audittag_id_c5b10b47_fk_horilla_a FOREIGN KEY (audittag_id) REFERENCES public.horilla_audit_audittag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_historicalcandidate_history_tags recruitment_historic_historicalcandidate__8b4729d7_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_historicalcandidate_history_tags
    ADD CONSTRAINT recruitment_historic_historicalcandidate__8b4729d7_fk_recruitme FOREIGN KEY (historicalcandidate_id) REFERENCES public.recruitment_historicalcandidate(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_historicalrejectedcandidate_history_tags recruitment_historic_historicalrejectedca_4765b9a4_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_historicalrejectedcandidate_history_tags
    ADD CONSTRAINT recruitment_historic_historicalrejectedca_4765b9a4_fk_recruitme FOREIGN KEY (historicalrejectedcandidate_id) REFERENCES public.recruitment_historicalrejectedcandidate(history_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_historicalrejectedcandidate recruitment_historic_history_user_id_ade3345e_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_historicalrejectedcandidate
    ADD CONSTRAINT recruitment_historic_history_user_id_ade3345e_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_historicalcandidate recruitment_historic_history_user_id_c56fecb3_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_historicalcandidate
    ADD CONSTRAINT recruitment_historic_history_user_id_c56fecb3_fk_auth_user FOREIGN KEY (history_user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_interviewschedule recruitment_intervie_candidate_id_id_bae2223f_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_interviewschedule
    ADD CONSTRAINT recruitment_intervie_candidate_id_id_bae2223f_fk_recruitme FOREIGN KEY (candidate_id_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_interviewschedule recruitment_intervie_created_by_id_7ea3824e_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_interviewschedule
    ADD CONSTRAINT recruitment_intervie_created_by_id_7ea3824e_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_interviewschedule_employee_id recruitment_intervie_employee_id_ccd9a309_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_interviewschedule_employee_id
    ADD CONSTRAINT recruitment_intervie_employee_id_ccd9a309_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_interviewschedule_employee_id recruitment_intervie_interviewschedule_id_60873c42_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_interviewschedule_employee_id
    ADD CONSTRAINT recruitment_intervie_interviewschedule_id_60873c42_fk_recruitme FOREIGN KEY (interviewschedule_id) REFERENCES public.recruitment_interviewschedule(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_interviewschedule recruitment_intervie_modified_by_id_d79442b1_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_interviewschedule
    ADD CONSTRAINT recruitment_intervie_modified_by_id_d79442b1_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_linkedinaccount recruitment_linkedin_company_id_id_92fc0d4f_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_linkedinaccount
    ADD CONSTRAINT recruitment_linkedin_company_id_id_92fc0d4f_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_linkedinaccount recruitment_linkedin_created_by_id_d4c65311_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_linkedinaccount
    ADD CONSTRAINT recruitment_linkedin_created_by_id_d4c65311_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_linkedinaccount recruitment_linkedin_modified_by_id_6f83d73b_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_linkedinaccount
    ADD CONSTRAINT recruitment_linkedin_modified_by_id_6f83d73b_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_questionordering recruitment_question_created_by_id_f8771bb5_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_questionordering
    ADD CONSTRAINT recruitment_question_created_by_id_f8771bb5_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_questionordering recruitment_question_modified_by_id_0355a7a5_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_questionordering
    ADD CONSTRAINT recruitment_question_modified_by_id_0355a7a5_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_questionordering recruitment_question_question_id_id_1b4adb1f_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_questionordering
    ADD CONSTRAINT recruitment_question_question_id_id_1b4adb1f_fk_recruitme FOREIGN KEY (question_id_id) REFERENCES public.recruitment_recruitmentsurvey(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_questionordering recruitment_question_recruitment_id_id_d35a120f_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_questionordering
    ADD CONSTRAINT recruitment_question_recruitment_id_id_d35a120f_fk_recruitme FOREIGN KEY (recruitment_id_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurveyanswer recruitment_recruitm_candidate_id_id_e1b0fedb_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurveyanswer
    ADD CONSTRAINT recruitment_recruitm_candidate_id_id_e1b0fedb_fk_recruitme FOREIGN KEY (candidate_id_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentgeneralsetting recruitment_recruitm_company_id_id_32a2ecaf_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentgeneralsetting
    ADD CONSTRAINT recruitment_recruitm_company_id_id_32a2ecaf_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment recruitment_recruitm_company_id_id_35c39ac1_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment
    ADD CONSTRAINT recruitment_recruitm_company_id_id_35c39ac1_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurveyanswer recruitment_recruitm_created_by_id_163d2633_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurveyanswer
    ADD CONSTRAINT recruitment_recruitm_created_by_id_163d2633_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurvey recruitment_recruitm_created_by_id_1a345de1_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurvey
    ADD CONSTRAINT recruitment_recruitm_created_by_id_1a345de1_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentgeneralsetting recruitment_recruitm_created_by_id_86a5f511_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentgeneralsetting
    ADD CONSTRAINT recruitment_recruitm_created_by_id_86a5f511_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment_recruitment_managers recruitment_recruitm_employee_id_a7139bba_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment_recruitment_managers
    ADD CONSTRAINT recruitment_recruitm_employee_id_a7139bba_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurveyanswer recruitment_recruitm_job_position_id_id_97a8b004_fk_base_jobp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurveyanswer
    ADD CONSTRAINT recruitment_recruitm_job_position_id_id_97a8b004_fk_base_jobp FOREIGN KEY (job_position_id_id) REFERENCES public.base_jobposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurvey_job_position_ids recruitment_recruitm_jobposition_id_89704641_fk_base_jobp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurvey_job_position_ids
    ADD CONSTRAINT recruitment_recruitm_jobposition_id_89704641_fk_base_jobp FOREIGN KEY (jobposition_id) REFERENCES public.base_jobposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment_open_positions recruitment_recruitm_jobposition_id_b152ea09_fk_base_jobp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment_open_positions
    ADD CONSTRAINT recruitment_recruitm_jobposition_id_b152ea09_fk_base_jobp FOREIGN KEY (jobposition_id) REFERENCES public.base_jobposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment recruitment_recruitm_linkedin_account_id__ed119e75_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment
    ADD CONSTRAINT recruitment_recruitm_linkedin_account_id__ed119e75_fk_recruitme FOREIGN KEY (linkedin_account_id_id) REFERENCES public.recruitment_linkedinaccount(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurveyanswer recruitment_recruitm_modified_by_id_1bfd6064_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurveyanswer
    ADD CONSTRAINT recruitment_recruitm_modified_by_id_1bfd6064_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentgeneralsetting recruitment_recruitm_modified_by_id_1e118681_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentgeneralsetting
    ADD CONSTRAINT recruitment_recruitm_modified_by_id_1e118681_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurvey recruitment_recruitm_modified_by_id_3669d754_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurvey
    ADD CONSTRAINT recruitment_recruitm_modified_by_id_3669d754_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment_survey_templates recruitment_recruitm_recruitment_id_082d049d_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment_survey_templates
    ADD CONSTRAINT recruitment_recruitm_recruitment_id_082d049d_fk_recruitme FOREIGN KEY (recruitment_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment_recruitment_managers recruitment_recruitm_recruitment_id_a4c3404a_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment_recruitment_managers
    ADD CONSTRAINT recruitment_recruitm_recruitment_id_a4c3404a_fk_recruitme FOREIGN KEY (recruitment_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment_skills recruitment_recruitm_recruitment_id_c62ab337_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment_skills
    ADD CONSTRAINT recruitment_recruitm_recruitment_id_c62ab337_fk_recruitme FOREIGN KEY (recruitment_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurvey_recruitment_ids recruitment_recruitm_recruitment_id_e1b93c79_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurvey_recruitment_ids
    ADD CONSTRAINT recruitment_recruitm_recruitment_id_e1b93c79_fk_recruitme FOREIGN KEY (recruitment_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment_open_positions recruitment_recruitm_recruitment_id_ecad5263_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment_open_positions
    ADD CONSTRAINT recruitment_recruitm_recruitment_id_ecad5263_fk_recruitme FOREIGN KEY (recruitment_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurveyanswer recruitment_recruitm_recruitment_id_id_56888b17_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurveyanswer
    ADD CONSTRAINT recruitment_recruitm_recruitment_id_id_56888b17_fk_recruitme FOREIGN KEY (recruitment_id_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurvey_template_id recruitment_recruitm_recruitmentsurvey_id_45834a00_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurvey_template_id
    ADD CONSTRAINT recruitment_recruitm_recruitmentsurvey_id_45834a00_fk_recruitme FOREIGN KEY (recruitmentsurvey_id) REFERENCES public.recruitment_recruitmentsurvey(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurvey_recruitment_ids recruitment_recruitm_recruitmentsurvey_id_711bd7eb_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurvey_recruitment_ids
    ADD CONSTRAINT recruitment_recruitm_recruitmentsurvey_id_711bd7eb_fk_recruitme FOREIGN KEY (recruitmentsurvey_id) REFERENCES public.recruitment_recruitmentsurvey(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurvey_job_position_ids recruitment_recruitm_recruitmentsurvey_id_75c9ce77_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurvey_job_position_ids
    ADD CONSTRAINT recruitment_recruitm_recruitmentsurvey_id_75c9ce77_fk_recruitme FOREIGN KEY (recruitmentsurvey_id) REFERENCES public.recruitment_recruitmentsurvey(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment_skills recruitment_recruitm_skill_id_659ac48e_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment_skills
    ADD CONSTRAINT recruitment_recruitm_skill_id_659ac48e_fk_recruitme FOREIGN KEY (skill_id) REFERENCES public.recruitment_skill(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment_survey_templates recruitment_recruitm_surveytemplate_id_536c97fa_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment_survey_templates
    ADD CONSTRAINT recruitment_recruitm_surveytemplate_id_536c97fa_fk_recruitme FOREIGN KEY (surveytemplate_id) REFERENCES public.recruitment_surveytemplate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitmentsurvey_template_id recruitment_recruitm_surveytemplate_id_54a3a2e8_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitmentsurvey_template_id
    ADD CONSTRAINT recruitment_recruitm_surveytemplate_id_54a3a2e8_fk_recruitme FOREIGN KEY (surveytemplate_id) REFERENCES public.recruitment_surveytemplate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment recruitment_recruitment_created_by_id_7487d8a1_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment
    ADD CONSTRAINT recruitment_recruitment_created_by_id_7487d8a1_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_recruitment recruitment_recruitment_modified_by_id_3da7024d_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_recruitment
    ADD CONSTRAINT recruitment_recruitment_modified_by_id_3da7024d_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_rejectedcandidate recruitment_rejected_candidate_id_id_94408255_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_rejectedcandidate
    ADD CONSTRAINT recruitment_rejected_candidate_id_id_94408255_fk_recruitme FOREIGN KEY (candidate_id_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_rejectedcandidate recruitment_rejected_created_by_id_0d2b6a1a_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_rejectedcandidate
    ADD CONSTRAINT recruitment_rejected_created_by_id_0d2b6a1a_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_rejectedcandidate recruitment_rejected_modified_by_id_9bef5a46_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_rejectedcandidate
    ADD CONSTRAINT recruitment_rejected_modified_by_id_9bef5a46_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_rejectedcandidate_reject_reason_id recruitment_rejected_rejectedcandidate_id_0029fa4e_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_rejectedcandidate_reject_reason_id
    ADD CONSTRAINT recruitment_rejected_rejectedcandidate_id_0029fa4e_fk_recruitme FOREIGN KEY (rejectedcandidate_id) REFERENCES public.recruitment_rejectedcandidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_rejectedcandidate_reject_reason_id recruitment_rejected_rejectreason_id_a5275520_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_rejectedcandidate_reject_reason_id
    ADD CONSTRAINT recruitment_rejected_rejectreason_id_a5275520_fk_recruitme FOREIGN KEY (rejectreason_id) REFERENCES public.recruitment_rejectreason(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_rejectreason recruitment_rejectre_company_id_id_710f492e_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_rejectreason
    ADD CONSTRAINT recruitment_rejectre_company_id_id_710f492e_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_rejectreason recruitment_rejectre_modified_by_id_87e738ae_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_rejectreason
    ADD CONSTRAINT recruitment_rejectre_modified_by_id_87e738ae_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_rejectreason recruitment_rejectreason_created_by_id_f79fee48_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_rejectreason
    ADD CONSTRAINT recruitment_rejectreason_created_by_id_f79fee48_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_resume recruitment_resume_recruitment_id_id_00eb694d_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_resume
    ADD CONSTRAINT recruitment_resume_recruitment_id_id_00eb694d_fk_recruitme FOREIGN KEY (recruitment_id_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_skill recruitment_skill_created_by_id_fbf18ae8_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_skill
    ADD CONSTRAINT recruitment_skill_created_by_id_fbf18ae8_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_skill recruitment_skill_modified_by_id_32de1bd8_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_skill
    ADD CONSTRAINT recruitment_skill_modified_by_id_32de1bd8_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_skillzonecandidate recruitment_skillzon_candidate_id_id_ac9e3998_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_skillzonecandidate
    ADD CONSTRAINT recruitment_skillzon_candidate_id_id_ac9e3998_fk_recruitme FOREIGN KEY (candidate_id_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_skillzonecandidate recruitment_skillzon_created_by_id_bea62548_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_skillzonecandidate
    ADD CONSTRAINT recruitment_skillzon_created_by_id_bea62548_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_skillzonecandidate recruitment_skillzon_modified_by_id_a1ce64d0_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_skillzonecandidate
    ADD CONSTRAINT recruitment_skillzon_modified_by_id_a1ce64d0_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_skillzonecandidate recruitment_skillzon_skill_zone_id_id_f55c73fc_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_skillzonecandidate
    ADD CONSTRAINT recruitment_skillzon_skill_zone_id_id_f55c73fc_fk_recruitme FOREIGN KEY (skill_zone_id_id) REFERENCES public.recruitment_skillzone(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_skillzone recruitment_skillzone_company_id_id_a5d93a16_fk_base_company_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_skillzone
    ADD CONSTRAINT recruitment_skillzone_company_id_id_a5d93a16_fk_base_company_id FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_skillzone recruitment_skillzone_created_by_id_5d1ea287_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_skillzone
    ADD CONSTRAINT recruitment_skillzone_created_by_id_5d1ea287_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_skillzone recruitment_skillzone_modified_by_id_e00c979e_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_skillzone
    ADD CONSTRAINT recruitment_skillzone_modified_by_id_e00c979e_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stage recruitment_stage_created_by_id_93d9a4be_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stage
    ADD CONSTRAINT recruitment_stage_created_by_id_93d9a4be_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stage recruitment_stage_modified_by_id_96c190ac_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stage
    ADD CONSTRAINT recruitment_stage_modified_by_id_96c190ac_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stage recruitment_stage_recruitment_id_id_d63ee32a_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stage
    ADD CONSTRAINT recruitment_stage_recruitment_id_id_d63ee32a_fk_recruitme FOREIGN KEY (recruitment_id_id) REFERENCES public.recruitment_recruitment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stage_stage_managers recruitment_stage_st_employee_id_e7e5236a_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stage_stage_managers
    ADD CONSTRAINT recruitment_stage_st_employee_id_e7e5236a_fk_employee_ FOREIGN KEY (employee_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stage_stage_managers recruitment_stage_st_stage_id_6d61885b_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stage_stage_managers
    ADD CONSTRAINT recruitment_stage_st_stage_id_6d61885b_fk_recruitme FOREIGN KEY (stage_id) REFERENCES public.recruitment_stage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stagefiles recruitment_stagefiles_created_by_id_a3b5b93f_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stagefiles
    ADD CONSTRAINT recruitment_stagefiles_created_by_id_a3b5b93f_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stagefiles recruitment_stagefiles_modified_by_id_cb03fbd9_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stagefiles
    ADD CONSTRAINT recruitment_stagefiles_modified_by_id_cb03fbd9_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stagenote recruitment_stagenot_candidate_id_id_d1383dd3_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stagenote
    ADD CONSTRAINT recruitment_stagenot_candidate_id_id_d1383dd3_fk_recruitme FOREIGN KEY (candidate_id_id) REFERENCES public.recruitment_candidate(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stagenote recruitment_stagenot_stage_id_id_1a358085_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stagenote
    ADD CONSTRAINT recruitment_stagenot_stage_id_id_1a358085_fk_recruitme FOREIGN KEY (stage_id_id) REFERENCES public.recruitment_stage(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stagenote_stage_files recruitment_stagenot_stagefiles_id_c02993d0_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stagenote_stage_files
    ADD CONSTRAINT recruitment_stagenot_stagefiles_id_c02993d0_fk_recruitme FOREIGN KEY (stagefiles_id) REFERENCES public.recruitment_stagefiles(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stagenote_stage_files recruitment_stagenot_stagenote_id_8a0b35b6_fk_recruitme; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stagenote_stage_files
    ADD CONSTRAINT recruitment_stagenot_stagenote_id_8a0b35b6_fk_recruitme FOREIGN KEY (stagenote_id) REFERENCES public.recruitment_stagenote(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stagenote recruitment_stagenot_updated_by_id_ed4ff558_fk_employee_; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stagenote
    ADD CONSTRAINT recruitment_stagenot_updated_by_id_ed4ff558_fk_employee_ FOREIGN KEY (updated_by_id) REFERENCES public.employee_employee(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stagenote recruitment_stagenote_created_by_id_b3a66e86_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stagenote
    ADD CONSTRAINT recruitment_stagenote_created_by_id_b3a66e86_fk_auth_user_id FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_stagenote recruitment_stagenote_modified_by_id_c57c24d3_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_stagenote
    ADD CONSTRAINT recruitment_stagenote_modified_by_id_c57c24d3_fk_auth_user_id FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_surveytemplate recruitment_surveyte_company_id_id_5bae672b_fk_base_comp; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_surveytemplate
    ADD CONSTRAINT recruitment_surveyte_company_id_id_5bae672b_fk_base_comp FOREIGN KEY (company_id_id) REFERENCES public.base_company(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_surveytemplate recruitment_surveyte_created_by_id_38b804e2_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_surveytemplate
    ADD CONSTRAINT recruitment_surveyte_created_by_id_38b804e2_fk_auth_user FOREIGN KEY (created_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: recruitment_surveytemplate recruitment_surveyte_modified_by_id_6311950c_fk_auth_user; Type: FK CONSTRAINT; Schema: public; Owner: horilla
--

ALTER TABLE ONLY public.recruitment_surveytemplate
    ADD CONSTRAINT recruitment_surveyte_modified_by_id_6311950c_fk_auth_user FOREIGN KEY (modified_by_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


--
--

