-- Name: entitys_entity_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('entitys_entity_id_seq', 11, true);


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



--
-- Name: entry_forms_entry_form_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('entry_forms_entry_form_id_seq', 1, false);


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



--
-- Name: evaluation_points_evaluation_point_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('evaluation_points_evaluation_point_id_seq', 1, false);


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



--
-- Name: farm_fields_farm_field_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('farm_fields_farm_field_id_seq', 1, false);


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



--
-- Name: fields_field_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('fields_field_id_seq', 1, false);


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



--
-- Name: fiscal_years_fiscal_year_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('fiscal_years_fiscal_year_id_seq', 1, false);


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



--
-- Name: follow_up_follow_up_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('follow_up_follow_up_id_seq', 1, false);


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



--
-- Name: forms_form_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('forms_form_id_seq', 1, false);


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



--
-- Name: gls_gl_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('gls_gl_id_seq', 1, false);


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



--
-- Name: helpdesk_helpdesk_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('helpdesk_helpdesk_id_seq', 1, false);


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



--
-- Name: holidays_holiday_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('holidays_holiday_id_seq', 1, false);


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



--
-- Name: identification_types_identification_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('identification_types_identification_type_id_seq', 1, false);


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



--
-- Name: identifications_identification_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('identifications_identification_id_seq', 1, false);


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

INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (1, 0, 'Aerospace', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (2, 0, 'Agriculture', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (3, 0, 'Automotive', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (4, 0, 'Business and Consultancy Services', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (5, 0, 'ICT - Reseller', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (6, 0, 'ICT - Services and Consultancy', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (7, 0, 'ICT - Manufacturer', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (8, 0, 'ICT - Software Development', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (9, 0, 'Investments', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (10, 0, 'Education', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (11, 0, 'Electronics', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (12, 0, 'Finance, Banking, Insurance', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (13, 0, 'Government - National or Federal', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (14, 0, 'Government - State, Country or Local', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (15, 0, 'Healthcare', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (16, 0, 'Hotel and Leisure', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (17, 0, 'Legal', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (18, 0, 'Manufacturing', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (19, 0, 'Media, Marketing, Entertainment, Publishing, PR', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (20, 0, 'Real Estate', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (21, 0, 'Retail, Wholesale', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (22, 0, 'Telecoms', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (23, 0, 'Transportation and Distribution', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (24, 0, 'Travel and Tours', NULL);
INSERT INTO industry (industry_id, org_id, industry_name, details) VALUES (25, 0, 'Other', NULL);


--
-- Name: industry_industry_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('industry_industry_id_seq', 25, true);


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



--
-- Name: intake_intake_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('intake_intake_id_seq', 1, false);


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



--
-- Name: interns_intern_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('interns_intern_id_seq', 1, false);


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



--
-- Name: internships_internship_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('internships_internship_id_seq', 1, false);


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

INSERT INTO item_category (item_category_id, org_id, item_category_name, details) VALUES (1, 0, 'Services', NULL);
INSERT INTO item_category (item_category_id, org_id, item_category_name, details) VALUES (2, 0, 'Goods', NULL);
INSERT INTO item_category (item_category_id, org_id, item_category_name, details) VALUES (3, 0, 'Utilities', NULL);


--
-- Name: item_category_item_category_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('item_category_item_category_id_seq', 3, true);


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

INSERT INTO item_units (item_unit_id, org_id, item_unit_name, details) VALUES (1, 0, 'Each', NULL);
INSERT INTO item_units (item_unit_id, org_id, item_unit_name, details) VALUES (2, 0, 'Man Hours', NULL);
INSERT INTO item_units (item_unit_id, org_id, item_unit_name, details) VALUES (3, 0, '100KG', NULL);


--
-- Name: item_units_item_unit_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('item_units_item_unit_id_seq', 3, true);


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

INSERT INTO items (item_id, org_id, item_category_id, tax_type_id, item_unit_id, sales_account_id, purchase_account_id, item_name, bar_code, inventory, for_sale, for_purchase, sales_price, purchase_price, reorder_level, lead_time, is_active, details) VALUES (1, 0, 1, 2, 1, 70010, 80000, 'Domains', NULL, false, true, false, 5000, 0, NULL, NULL, true, NULL);
INSERT INTO items (item_id, org_id, item_category_id, tax_type_id, item_unit_id, sales_account_id, purchase_account_id, item_name, bar_code, inventory, for_sale, for_purchase, sales_price, purchase_price, reorder_level, lead_time, is_active, details) VALUES (2, 0, 1, 2, 1, 70010, 80000, 'Baraza HCMS', NULL, false, true, false, 0, 0, NULL, NULL, true, NULL);
INSERT INTO items (item_id, org_id, item_category_id, tax_type_id, item_unit_id, sales_account_id, purchase_account_id, item_name, bar_code, inventory, for_sale, for_purchase, sales_price, purchase_price, reorder_level, lead_time, is_active, details) VALUES (3, 0, 1, 2, 1, 70010, 80000, 'Systems Support', NULL, false, true, false, 0, 0, NULL, NULL, false, NULL);
INSERT INTO items (item_id, org_id, item_category_id, tax_type_id, item_unit_id, sales_account_id, purchase_account_id, item_name, bar_code, inventory, for_sale, for_purchase, sales_price, purchase_price, reorder_level, lead_time, is_active, details) VALUES (4, 0, 3, 2, 1, 70005, 95500, 'Office Rent', NULL, false, false, true, 0, 0, NULL, NULL, true, NULL);


--
-- Name: items_item_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('items_item_id_seq', 4, true);


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



--
-- Name: job_reviews_job_review_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('job_reviews_job_review_id_seq', 1, false);


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

INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (1, 0, 'Accounting', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (2, 0, 'Banking and Financial Services', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (3, 0, 'CEO', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (4, 0, 'General Management', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (5, 0, 'Creative and Design', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (6, 0, 'Customer Service and Call Centre', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (7, 0, 'Education and Training', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (8, 0, 'Engineering and Construction', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (9, 0, 'Farming and Agribusiness', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (10, 0, 'Government', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (11, 0, 'Healthcare and Pharmaceutical', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (12, 0, 'Human Resources', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (13, 0, 'Insurance', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (14, 0, 'ICT', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (15, 0, 'Telecoms', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (16, 0, 'Legal', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (17, 0, 'Manufacturing', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (18, 0, 'Marketing, Media and Brand', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (19, 0, 'NGO, Community and Social Development', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (20, 0, 'Office and Administration', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (21, 0, 'Project and Programme Management', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (22, 0, 'Research, Science and Biotech', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (23, 0, 'Retail', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (24, 0, 'Sales', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (25, 0, 'Security', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (26, 0, 'Strategy and Consulting', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (27, 0, 'Tourism and Travel', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (28, 0, 'Trades and Services', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (29, 0, 'Transport and Logistics', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (30, 0, 'Internships and Volunteering', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (31, 0, 'Real Estate', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (32, 0, 'Hospitality', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (33, 0, 'Other', NULL);
INSERT INTO jobs_category (jobs_category_id, org_id, jobs_category, details) VALUES (34, 1, 'General Management', NULL);


--
-- Name: jobs_category_jobs_category_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('jobs_category_jobs_category_id_seq', 34, true);


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



--
-- Name: journals_journal_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('journals_journal_id_seq', 1, false);


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

INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (1, 0, 'Wife', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (2, 0, 'Husband', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (3, 0, 'Daughter', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (4, 0, 'Son', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (5, 0, 'Mother', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (6, 0, 'Father', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (7, 0, 'Brother', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (8, 0, 'Sister', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (9, 0, 'Others', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (10, 1, 'Wife', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (11, 1, 'Husband', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (12, 1, 'Daughter', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (13, 1, 'Son', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (14, 1, 'Mother', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (15, 1, 'Father', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (16, 1, 'Brother', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (17, 1, 'Sister', NULL);
INSERT INTO kin_types (kin_type_id, org_id, kin_type_name, details) VALUES (18, 1, 'Others', NULL);


--
-- Name: kin_types_kin_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('kin_types_kin_type_id_seq', 18, true);


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



--
-- Name: kins_kin_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('kins_kin_id_seq', 1, false);


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



--
-- Name: lead_items_lead_item_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('lead_items_lead_item_id_seq', 1, false);


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



--
-- Name: leads_lead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('leads_lead_id_seq', 1, false);


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

INSERT INTO leave_types (leave_type_id, org_id, leave_type_name, allowed_leave_days, leave_days_span, use_type, month_quota, initial_days, maximum_carry, include_holiday, include_mon, include_tue, include_wed, include_thu, include_fri, include_sat, include_sun, details) VALUES (0, 0, 'Annual Leave', 21, 7, 1, 0, 0, 0, false, true, true, true, true, true, false, false, NULL);


--
-- Name: leave_types_leave_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('leave_types_leave_type_id_seq', 1, false);


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



--
-- Name: leave_work_days_leave_work_day_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('leave_work_days_leave_work_day_id_seq', 1, false);


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



--
-- Name: ledger_links_ledger_link_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('ledger_links_ledger_link_id_seq', 1, false);


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



--
-- Name: ledger_types_ledger_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('ledger_types_ledger_type_id_seq', 1, false);


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



--
-- Name: loan_monthly_loan_month_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('loan_monthly_loan_month_id_seq', 1, false);


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

INSERT INTO loan_types (loan_type_id, adjustment_id, org_id, loan_type_name, default_interest, reducing_balance, details) VALUES (0, 15, 0, 'Emergency', 6, true, NULL);


--
-- Name: loan_types_loan_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('loan_types_loan_type_id_seq', 1, false);


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



--
-- Name: loans_loan_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('loans_loan_id_seq', 1, false);


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

INSERT INTO locations (location_id, org_id, location_name, details) VALUES (0, 0, 'Main office', NULL);
INSERT INTO locations (location_id, org_id, location_name, details) VALUES (1, 1, 'Main office', NULL);


--
-- Name: locations_location_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('locations_location_id_seq', 1, true);


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



--
-- Name: objective_details_objective_detail_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('objective_details_objective_detail_id_seq', 1, false);


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

INSERT INTO objective_types (objective_type_id, org_id, objective_type_name, details) VALUES (1, 0, 'General', NULL);


--
-- Name: objective_types_objective_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('objective_types_objective_type_id_seq', 1, true);


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



--
-- Name: objectives_objective_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('objectives_objective_id_seq', 1, false);


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



--
-- Name: org_events_org_event_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('org_events_org_event_id_seq', 1, false);


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

INSERT INTO orgs (org_id, currency_id, default_country_id, parent_org_id, org_name, org_full_name, org_sufix, is_default, is_active, logo, pin, pcc, system_key, system_identifier, mac_address, public_key, license, details, org_client_id, payroll_payable, cert_number, vat_number, enforce_budget, invoice_footer, employee_limit, transaction_limit, expiry_date) VALUES (1, 5, NULL, NULL, 'Default', NULL, 'df', true, true, 'logo.png', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, NULL, true, NULL, 1000, 1000000, NULL);
INSERT INTO orgs (org_id, currency_id, default_country_id, parent_org_id, org_name, org_full_name, org_sufix, is_default, is_active, logo, pin, pcc, system_key, system_identifier, mac_address, public_key, license, details, org_client_id, payroll_payable, cert_number, vat_number, enforce_budget, invoice_footer, employee_limit, transaction_limit, expiry_date) VALUES (0, 1, 'KE', NULL, 'Dew CIS Solutions Ltd', 'Dew CIS Solutions Ltd', 'dc', true, true, 'logo.png', 'P051165288J', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, true, 'C.102554', '0142653A', true, 'Make all payments to : Dew CIS Solutions ltd
Thank you for your Business
We Turn your information into profitability', 1000, 1000000, NULL);


--
-- Name: orgs_org_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('orgs_org_id_seq', 1, true);


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

INSERT INTO pay_groups (pay_group_id, org_id, pay_group_name, gl_payment_account, bank_header, bank_address, details) VALUES (0, 0, 'Default', '40055', NULL, NULL, NULL);
INSERT INTO pay_groups (pay_group_id, org_id, pay_group_name, gl_payment_account, bank_header, bank_address, details) VALUES (1, 1, 'Default', '40055', NULL, NULL, NULL);


--
-- Name: pay_groups_pay_group_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pay_groups_pay_group_id_seq', 1, true);


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



--
-- Name: pay_scale_steps_pay_scale_step_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pay_scale_steps_pay_scale_step_id_seq', 1, false);


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



--
-- Name: pay_scale_years_pay_scale_year_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pay_scale_years_pay_scale_year_id_seq', 1, false);


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

INSERT INTO pay_scales (pay_scale_id, currency_id, org_id, pay_scale_name, min_pay, max_pay, details) VALUES (0, NULL, 0, 'Basic', 0, 1000000, NULL);
INSERT INTO pay_scales (pay_scale_id, currency_id, org_id, pay_scale_name, min_pay, max_pay, details) VALUES (1, NULL, 1, 'Basic', 0, 1000000, NULL);


--
-- Name: pay_scales_pay_scale_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pay_scales_pay_scale_id_seq', 1, true);


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



--
-- Name: pc_allocations_pc_allocation_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pc_allocations_pc_allocation_id_seq', 1, false);


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



--
-- Name: pc_banking_pc_banking_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pc_banking_pc_banking_id_seq', 1, false);


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



--
-- Name: pc_budget_pc_budget_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pc_budget_pc_budget_id_seq', 1, false);


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



--
-- Name: pc_category_pc_category_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pc_category_pc_category_id_seq', 1, false);


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



--
-- Name: pc_expenditure_pc_expenditure_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pc_expenditure_pc_expenditure_id_seq', 1, false);


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



--
-- Name: pc_items_pc_item_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pc_items_pc_item_id_seq', 1, false);


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



--
-- Name: pc_types_pc_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pc_types_pc_type_id_seq', 1, false);


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



--
-- Name: pdefinitions_pdefinition_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pdefinitions_pdefinition_id_seq', 1, false);


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



--
-- Name: pensions_pension_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('pensions_pension_id_seq', 1, false);


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



--
-- Name: period_tax_rates_period_tax_rate_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('period_tax_rates_period_tax_rate_id_seq', 1, false);


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



--
-- Name: period_tax_types_period_tax_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('period_tax_types_period_tax_type_id_seq', 1, false);


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



--
-- Name: periods_period_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('periods_period_id_seq', 1, false);


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



--
-- Name: phases_phase_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('phases_phase_id_seq', 1, false);


--
-- Name: picture_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('picture_id_seq', 1, false);


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



--
-- Name: plevels_plevel_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('plevels_plevel_id_seq', 1, false);


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



--
-- Name: product_receipts_product_receipt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('product_receipts_product_receipt_id_seq', 1, false);


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



--
-- Name: productions_production_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('productions_production_id_seq', 1, false);


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

INSERT INTO products (product_id, org_id, product_name, is_singular, align_expiry, is_montly_bill, montly_cost, is_annual_bill, annual_cost, details) VALUES (1, 0, 'HCM Hosting per employee', true, true, false, 0, true, 200, 'HR and Payroll Hosting per employee per year');


--
-- Name: products_product_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('products_product_id_seq', 1, true);


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



--
-- Name: project_cost_project_cost_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('project_cost_project_cost_id_seq', 1, false);


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



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



--
-- Name: project_staff_costs_project_staff_cost_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('project_staff_costs_project_staff_cost_id_seq', 1, false);


--
-- Name: project_staff_project_staff_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('project_staff_project_staff_id_seq', 1, false);


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

INSERT INTO project_types (project_type_id, org_id, project_type_name, details) VALUES (1, NULL, 'Software Development', NULL);


--
-- Name: project_types_project_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('project_types_project_type_id_seq', 2, true);


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



--
-- Name: projects_project_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('projects_project_id_seq', 1, false);


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



--
-- Name: ptypes_ptype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('ptypes_ptype_id_seq', 1, false);


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



--
-- Name: quotations_quotation_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('quotations_quotation_id_seq', 1, false);


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

INSERT INTO receipt_sources (receipt_source_id, org_id, receipt_source_name, details) VALUES (1, 0, 'MPESA', NULL);
INSERT INTO receipt_sources (receipt_source_id, org_id, receipt_source_name, details) VALUES (2, 0, 'Cash', NULL);
INSERT INTO receipt_sources (receipt_source_id, org_id, receipt_source_name, details) VALUES (3, 0, 'Cheque', NULL);


--
-- Name: receipt_sources_receipt_source_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('receipt_sources_receipt_source_id_seq', 3, true);


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



--
-- Name: reporting_reporting_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('reporting_reporting_id_seq', 1, false);


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

INSERT INTO review_category (review_category_id, org_id, review_category_name, rate_objectives, details) VALUES (0, 0, 'Annual Review', true, NULL);


--
-- Name: review_category_review_category_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('review_category_review_category_id_seq', 1, false);


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



--
-- Name: review_points_review_point_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('review_points_review_point_id_seq', 1, false);


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



--
-- Name: shift_schedule_shift_schedule_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('shift_schedule_shift_schedule_id_seq', 1, false);


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



--
-- Name: shifts_shift_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('shifts_shift_id_seq', 1, false);


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

INSERT INTO skill_category (skill_category_id, org_id, skill_category_name, details) VALUES (0, 0, 'Others', NULL);
INSERT INTO skill_category (skill_category_id, org_id, skill_category_name, details) VALUES (1, 0, 'Hardware', NULL);
INSERT INTO skill_category (skill_category_id, org_id, skill_category_name, details) VALUES (2, 0, 'Operating System', NULL);
INSERT INTO skill_category (skill_category_id, org_id, skill_category_name, details) VALUES (3, 0, 'Software', NULL);
INSERT INTO skill_category (skill_category_id, org_id, skill_category_name, details) VALUES (4, 0, 'Networking', NULL);
INSERT INTO skill_category (skill_category_id, org_id, skill_category_name, details) VALUES (6, 0, 'Servers', NULL);
INSERT INTO skill_category (skill_category_id, org_id, skill_category_name, details) VALUES (8, 0, 'Communication/Messaging Suite', NULL);
INSERT INTO skill_category (skill_category_id, org_id, skill_category_name, details) VALUES (9, 0, 'Voip', NULL);
INSERT INTO skill_category (skill_category_id, org_id, skill_category_name, details) VALUES (10, 0, 'Development', NULL);


--
-- Name: skill_category_skill_category_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('skill_category_skill_category_id_seq', 10, true);


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

INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (0, 0, 0, 'Indicate Your Skill', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (1, 1, 0, 'Personal Computer', 'Identify the different components of a computer', 'Understand the working of each component', 'Troubleshoot, Diagonize and Repair', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (2, 1, 0, 'Dot Matrix Printer', 'Identify the different components of a computer', 'Understand the working of each component', 'Troubleshoot, Diagonize and Repair', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (3, 1, 0, 'Ticket Printer', 'Identify the different components of a computer', 'Understand the working of each component', 'Troubleshoot, Diagonize and Repair', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (4, 1, 0, 'Hp Printer', 'Identify the different components of a computer', 'Understand the working of each component', 'Troubleshoot, Diagonize and Repair', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (5, 2, 0, 'Dos', 'Installation', 'Configuration', 'Troubleshooting and Support', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (6, 2, 0, 'Windowsxp', 'Installation', 'Configuration', 'Troubleshooting and Support', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (7, 2, 0, 'Linux', 'Installation', 'Configuration', 'Troubleshooting and Support', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (8, 2, 0, 'Solaris Unix', 'Installation', 'Configuration', 'Troubleshooting and Support', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (10, 3, 0, 'Office', 'Installation, Backup and Recovery', 'Application and Usage', 'Advanced Usage', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (11, 3, 0, 'Browsing', 'Setup ', 'Usage ', 'Troubleshooting and Support', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (12, 3, 0, 'Galileo Products', 'Setup ', 'Usage ', 'Troubleshooting and Support', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (13, 3, 0, 'Antivirus', 'Setup ', 'Updates and Support', 'Troubleshooting and Support', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (9, 3, 0, 'Dialup', 'Installation', 'Configuration', 'Troubleshooting and Support', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (21, 4, 0, 'Dialup', 'Dialup', 'Configuration', 'Troubleshooting and Support', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (22, 4, 0, 'Lan', 'Installation ', 'Configuration', 'Troubleshooting and Support', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (23, 4, 0, 'Wan', 'Installation', 'Configuration', 'Configuration', NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (29, 6, 0, 'Samba', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (30, 6, 0, 'Mail', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (31, 6, 0, 'Web', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (32, 6, 0, 'Application ', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (33, 6, 0, 'Identity Management', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (34, 6, 0, 'Network Management   ', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (36, 6, 0, 'Backup And Storage Services', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (37, 8, 0, 'Groupware', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (38, 9, 0, 'Asterix', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (39, 10, 0, 'Database', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (40, 10, 0, 'Design', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (41, 10, 0, 'Baraza', NULL, NULL, NULL, NULL);
INSERT INTO skill_types (skill_type_id, skill_category_id, org_id, skill_type_name, basic, intermediate, advanced, details) VALUES (42, 10, 0, 'Coding Java', NULL, NULL, NULL, NULL);


--
-- Name: skill_types_skill_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('skill_types_skill_type_id_seq', 42, true);


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



--
-- Name: skills_skill_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('skills_skill_id_seq', 1, false);


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



--
-- Name: stock_lines_stock_line_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('stock_lines_stock_line_id_seq', 1, false);


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



--
-- Name: stocks_stock_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('stocks_stock_id_seq', 1, false);


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



--
-- Name: stores_store_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('stores_store_id_seq', 1, false);


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



--
-- Name: sub_fields_sub_field_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sub_fields_sub_field_id_seq', 1, false);


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

INSERT INTO subscription_levels (subscription_level_id, org_id, subscription_level_name, details) VALUES (0, 0, 'Basic', NULL);
INSERT INTO subscription_levels (subscription_level_id, org_id, subscription_level_name, details) VALUES (1, 0, 'Manager', NULL);
INSERT INTO subscription_levels (subscription_level_id, org_id, subscription_level_name, details) VALUES (2, 0, 'Consumer', NULL);
INSERT INTO subscription_levels (subscription_level_id, org_id, subscription_level_name, details) VALUES (4, 1, 'Basic', NULL);
INSERT INTO subscription_levels (subscription_level_id, org_id, subscription_level_name, details) VALUES (5, 1, 'Manager', NULL);
INSERT INTO subscription_levels (subscription_level_id, org_id, subscription_level_name, details) VALUES (6, 1, 'Consumer', NULL);


--
-- Name: subscription_levels_subscription_level_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('subscription_levels_subscription_level_id_seq', 6, true);


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



--
-- Name: subscriptions_subscription_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('subscriptions_subscription_id_seq', 1, false);


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



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



--
-- Name: sys_audit_trail_sys_audit_trail_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_audit_trail_sys_audit_trail_id_seq', 1, false);


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

INSERT INTO sys_continents (sys_continent_id, sys_continent_name) VALUES ('AF', 'Africa');
INSERT INTO sys_continents (sys_continent_id, sys_continent_name) VALUES ('AS', 'Asia');
INSERT INTO sys_continents (sys_continent_id, sys_continent_name) VALUES ('EU', 'Europe');
INSERT INTO sys_continents (sys_continent_id, sys_continent_name) VALUES ('NA', 'North America');
INSERT INTO sys_continents (sys_continent_id, sys_continent_name) VALUES ('SA', 'South America');
INSERT INTO sys_continents (sys_continent_id, sys_continent_name) VALUES ('OC', 'Oceania');
INSERT INTO sys_continents (sys_continent_id, sys_continent_name) VALUES ('AN', 'Antarctica');


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

INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AF', 'AS', 'AFG', '004', NULL, 'Afghanistan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AX', 'EU', 'ALA', '248', NULL, 'Aland Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AL', 'EU', 'ALB', '008', NULL, 'Albania', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('DZ', 'AF', 'DZA', '012', NULL, 'Algeria', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AS', 'OC', 'ASM', '016', NULL, 'American Samoa', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AD', 'EU', 'AND', '020', NULL, 'Andorra', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AO', 'AF', 'AGO', '024', NULL, 'Angola', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AI', 'NA', 'AIA', '660', NULL, 'Anguilla', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AQ', 'AN', 'ATA', '010', NULL, 'Antarctica', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AG', 'NA', 'ATG', '028', NULL, 'Antigua and Barbuda', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AR', 'SA', 'ARG', '032', NULL, 'Argentina', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AM', 'AS', 'ARM', '051', NULL, 'Armenia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AW', 'NA', 'ABW', '533', NULL, 'Aruba', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AU', 'OC', 'AUS', '036', NULL, 'Australia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AT', 'EU', 'AUT', '040', NULL, 'Austria', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AZ', 'AS', 'AZE', '031', NULL, 'Azerbaijan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BS', 'NA', 'BHS', '044', NULL, 'Bahamas', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BH', 'AS', 'BHR', '048', NULL, 'Bahrain', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BD', 'AS', 'BGD', '050', NULL, 'Bangladesh', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BB', 'NA', 'BRB', '052', NULL, 'Barbados', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BY', 'EU', 'BLR', '112', NULL, 'Belarus', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BE', 'EU', 'BEL', '056', NULL, 'Belgium', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BZ', 'NA', 'BLZ', '084', NULL, 'Belize', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BJ', 'AF', 'BEN', '204', NULL, 'Benin', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BM', 'NA', 'BMU', '060', NULL, 'Bermuda', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BT', 'AS', 'BTN', '064', NULL, 'Bhutan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BO', 'SA', 'BOL', '068', NULL, 'Bolivia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BA', 'EU', 'BIH', '070', NULL, 'Bosnia and Herzegovina', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BW', 'AF', 'BWA', '072', NULL, 'Botswana', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BV', 'AN', 'BVT', '074', NULL, 'Bouvet Island', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BR', 'SA', 'BRA', '076', NULL, 'Brazil', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('IO', 'AS', 'IOT', '086', NULL, 'British Indian Ocean Territory', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('VG', 'NA', 'VGB', '092', NULL, 'British Virgin Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BN', 'AS', 'BRN', '096', NULL, 'Brunei Darussalam', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BG', 'EU', 'BGR', '100', NULL, 'Bulgaria', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BF', 'AF', 'BFA', '854', NULL, 'Burkina Faso', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BI', 'AF', 'BDI', '108', NULL, 'Burundi', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KH', 'AS', 'KHM', '116', NULL, 'Cambodia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CM', 'AF', 'CMR', '120', NULL, 'Cameroon', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CA', 'NA', 'CAN', '124', NULL, 'Canada', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CV', 'AF', 'CPV', '132', NULL, 'Cape Verde', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KY', 'NA', 'CYM', '136', NULL, 'Cayman Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CF', 'AF', 'CAF', '140', NULL, 'Central African Republic', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TD', 'AF', 'TCD', '148', NULL, 'Chad', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CL', 'SA', 'CHL', '152', NULL, 'Chile', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CN', 'AS', 'CHN', '156', NULL, 'China', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CX', 'AS', 'CXR', '162', NULL, 'Christmas Island', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CC', 'AS', 'CCK', '166', NULL, 'Cocos Keeling Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CO', 'SA', 'COL', '170', NULL, 'Colombia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KM', 'AF', 'COM', '174', NULL, 'Comoros', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CD', 'AF', 'COD', '180', NULL, 'Democratic Republic of Congo', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CG', 'AF', 'COG', '178', NULL, 'Republic of Congo', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CK', 'OC', 'COK', '184', NULL, 'Cook Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CR', 'NA', 'CRI', '188', NULL, 'Costa Rica', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CI', 'AF', 'CIV', '384', NULL, 'Cote d Ivoire', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('HR', 'EU', 'HRV', '191', NULL, 'Croatia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CU', 'NA', 'CUB', '192', NULL, 'Cuba', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CY', 'AS', 'CYP', '196', NULL, 'Cyprus', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CZ', 'EU', 'CZE', '203', NULL, 'Czech Republic', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('DK', 'EU', 'DNK', '208', NULL, 'Denmark', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('DJ', 'AF', 'DJI', '262', NULL, 'Djibouti', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('DM', 'NA', 'DMA', '212', NULL, 'Dominica', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('DO', 'NA', 'DOM', '214', NULL, 'Dominican Republic', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('EC', 'SA', 'ECU', '218', NULL, 'Ecuador', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('EG', 'AF', 'EGY', '818', NULL, 'Egypt', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SV', 'NA', 'SLV', '222', NULL, 'El Salvador', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GQ', 'AF', 'GNQ', '226', NULL, 'Equatorial Guinea', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('ER', 'AF', 'ERI', '232', NULL, 'Eritrea', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('EE', 'EU', 'EST', '233', NULL, 'Estonia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('ET', 'AF', 'ETH', '231', NULL, 'Ethiopia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('FO', 'EU', 'FRO', '234', NULL, 'Faroe Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('FK', 'SA', 'FLK', '238', NULL, 'Falkland Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('FJ', 'OC', 'FJI', '242', NULL, 'Fiji', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('FI', 'EU', 'FIN', '246', NULL, 'Finland', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('FR', 'EU', 'FRA', '250', NULL, 'France', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GF', 'SA', 'GUF', '254', NULL, 'French Guiana', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PF', 'OC', 'PYF', '258', NULL, 'French Polynesia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TF', 'AN', 'ATF', '260', NULL, 'French Southern Territories', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GA', 'AF', 'GAB', '266', NULL, 'Gabon', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GM', 'AF', 'GMB', '270', NULL, 'Gambia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GE', 'AS', 'GEO', '268', NULL, 'Georgia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('DE', 'EU', 'DEU', '276', NULL, 'Germany', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GH', 'AF', 'GHA', '288', NULL, 'Ghana', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GI', 'EU', 'GIB', '292', NULL, 'Gibraltar', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GR', 'EU', 'GRC', '300', NULL, 'Greece', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GL', 'NA', 'GRL', '304', NULL, 'Greenland', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GD', 'NA', 'GRD', '308', NULL, 'Grenada', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GP', 'NA', 'GLP', '312', NULL, 'Guadeloupe', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GU', 'OC', 'GUM', '316', NULL, 'Guam', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GT', 'NA', 'GTM', '320', NULL, 'Guatemala', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GG', 'EU', 'GGY', '831', NULL, 'Guernsey', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GN', 'AF', 'GIN', '324', NULL, 'Guinea', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GW', 'AF', 'GNB', '624', NULL, 'Guinea-Bissau', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GY', 'SA', 'GUY', '328', NULL, 'Guyana', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('HT', 'NA', 'HTI', '332', NULL, 'Haiti', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('HM', 'AN', 'HMD', '334', NULL, 'Heard Island and McDonald Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('VA', 'EU', 'VAT', '336', NULL, 'Vatican City State', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('HN', 'NA', 'HND', '340', NULL, 'Honduras', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('HK', 'AS', 'HKG', '344', NULL, 'Hong Kong', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('HU', 'EU', 'HUN', '348', NULL, 'Hungary', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('IS', 'EU', 'ISL', '352', NULL, 'Iceland', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('IN', 'AS', 'IND', '356', NULL, 'India', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('ID', 'AS', 'IDN', '360', NULL, 'Indonesia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('IR', 'AS', 'IRN', '364', NULL, 'Iran', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('IQ', 'AS', 'IRQ', '368', NULL, 'Iraq', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('IE', 'EU', 'IRL', '372', NULL, 'Ireland', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('IM', 'EU', 'IMN', '833', NULL, 'Isle of Man', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('IL', 'AS', 'ISR', '376', NULL, 'Israel', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('IT', 'EU', 'ITA', '380', NULL, 'Italy', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('JM', 'NA', 'JAM', '388', NULL, 'Jamaica', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('JP', 'AS', 'JPN', '392', NULL, 'Japan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('JE', 'EU', 'JEY', '832', NULL, 'Bailiwick of Jersey', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('JO', 'AS', 'JOR', '400', NULL, 'Jordan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KZ', 'AS', 'KAZ', '398', NULL, 'Kazakhstan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KE', 'AF', 'KEN', '404', NULL, 'Kenya', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KI', 'OC', 'KIR', '296', NULL, 'Kiribati', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KP', 'AS', 'PRK', '408', NULL, 'North Korea', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KR', 'AS', 'KOR', '410', NULL, 'South Korea', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KW', 'AS', 'KWT', '414', NULL, 'Kuwait', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KG', 'AS', 'KGZ', '417', NULL, 'Kyrgyz Republic', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LA', 'AS', 'LAO', '418', NULL, 'Lao Peoples Democratic Republic', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LV', 'EU', 'LVA', '428', NULL, 'Latvia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LB', 'AS', 'LBN', '422', NULL, 'Lebanon', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LS', 'AF', 'LSO', '426', NULL, 'Lesotho', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LR', 'AF', 'LBR', '430', NULL, 'Liberia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LY', 'AF', 'LBY', '434', NULL, 'Libyan Arab Jamahiriya', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LI', 'EU', 'LIE', '438', NULL, 'Liechtenstein', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LT', 'EU', 'LTU', '440', NULL, 'Lithuania', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LU', 'EU', 'LUX', '442', NULL, 'Luxembourg', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MO', 'AS', 'MAC', '446', NULL, 'Macao', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MK', 'EU', 'MKD', '807', NULL, 'Macedonia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MG', 'AF', 'MDG', '450', NULL, 'Madagascar', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MW', 'AF', 'MWI', '454', NULL, 'Malawi', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MY', 'AS', 'MYS', '458', NULL, 'Malaysia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MV', 'AS', 'MDV', '462', NULL, 'Maldives', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('ML', 'AF', 'MLI', '466', NULL, 'Mali', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MT', 'EU', 'MLT', '470', NULL, 'Malta', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MH', 'OC', 'MHL', '584', NULL, 'Marshall Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MQ', 'NA', 'MTQ', '474', NULL, 'Martinique', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MR', 'AF', 'MRT', '478', NULL, 'Mauritania', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MU', 'AF', 'MUS', '480', NULL, 'Mauritius', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('YT', 'AF', 'MYT', '175', NULL, 'Mayotte', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MX', 'NA', 'MEX', '484', NULL, 'Mexico', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('FM', 'OC', 'FSM', '583', NULL, 'Micronesia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MD', 'EU', 'MDA', '498', NULL, 'Moldova', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MC', 'EU', 'MCO', '492', NULL, 'Monaco', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MN', 'AS', 'MNG', '496', NULL, 'Mongolia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('ME', 'EU', 'MNE', '499', NULL, 'Montenegro', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MS', 'NA', 'MSR', '500', NULL, 'Montserrat', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MA', 'AF', 'MAR', '504', NULL, 'Morocco', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MZ', 'AF', 'MOZ', '508', NULL, 'Mozambique', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MM', 'AS', 'MMR', '104', NULL, 'Myanmar', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NA', 'AF', 'NAM', '516', NULL, 'Namibia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NR', 'OC', 'NRU', '520', NULL, 'Nauru', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NP', 'AS', 'NPL', '524', NULL, 'Nepal', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AN', 'NA', 'ANT', '530', NULL, 'Netherlands Antilles', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NL', 'EU', 'NLD', '528', NULL, 'Netherlands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NC', 'OC', 'NCL', '540', NULL, 'New Caledonia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NZ', 'OC', 'NZL', '554', NULL, 'New Zealand', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NI', 'NA', 'NIC', '558', NULL, 'Nicaragua', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NE', 'AF', 'NER', '562', NULL, 'Niger', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NG', 'AF', 'NGA', '566', NULL, 'Nigeria', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NU', 'OC', 'NIU', '570', NULL, 'Niue', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NF', 'OC', 'NFK', '574', NULL, 'Norfolk Island', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MP', 'OC', 'MNP', '580', NULL, 'Northern Mariana Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('NO', 'EU', 'NOR', '578', NULL, 'Norway', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('OM', 'AS', 'OMN', '512', NULL, 'Oman', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PK', 'AS', 'PAK', '586', NULL, 'Pakistan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PW', 'OC', 'PLW', '585', NULL, 'Palau', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PS', 'AS', 'PSE', '275', NULL, 'Palestinian Territory', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PA', 'NA', 'PAN', '591', NULL, 'Panama', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PG', 'OC', 'PNG', '598', NULL, 'Papua New Guinea', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PY', 'SA', 'PRY', '600', NULL, 'Paraguay', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PE', 'SA', 'PER', '604', NULL, 'Peru', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PH', 'AS', 'PHL', '608', NULL, 'Philippines', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PN', 'OC', 'PCN', '612', NULL, 'Pitcairn Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PL', 'EU', 'POL', '616', NULL, 'Poland', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PT', 'EU', 'PRT', '620', NULL, 'Portugal', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PR', 'NA', 'PRI', '630', NULL, 'Puerto Rico', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('QA', 'AS', 'QAT', '634', NULL, 'Qatar', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('RE', 'AF', 'REU', '638', NULL, 'Reunion', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('RO', 'EU', 'ROU', '642', NULL, 'Romania', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('RU', 'EU', 'RUS', '643', NULL, 'Russian Federation', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('RW', 'AF', 'RWA', '646', NULL, 'Rwanda', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('BL', 'NA', 'BLM', '652', NULL, 'Saint Barthelemy', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SH', 'AF', 'SHN', '654', NULL, 'Saint Helena', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('KN', 'NA', 'KNA', '659', NULL, 'Saint Kitts and Nevis', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LC', 'NA', 'LCA', '662', NULL, 'Saint Lucia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('MF', 'NA', 'MAF', '663', NULL, 'Saint Martin', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('PM', 'NA', 'SPM', '666', NULL, 'Saint Pierre and Miquelon', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('VC', 'NA', 'VCT', '670', NULL, 'Saint Vincent and the Grenadines', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('WS', 'OC', 'WSM', '882', NULL, 'Samoa', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SM', 'EU', 'SMR', '674', NULL, 'San Marino', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('ST', 'AF', 'STP', '678', NULL, 'Sao Tome and Principe', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SA', 'AS', 'SAU', '682', NULL, 'Saudi Arabia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SN', 'AF', 'SEN', '686', NULL, 'Senegal', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('RS', 'EU', 'SRB', '688', NULL, 'Serbia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SC', 'AF', 'SYC', '690', NULL, 'Seychelles', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SL', 'AF', 'SLE', '694', NULL, 'Sierra Leone', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SG', 'AS', 'SGP', '702', NULL, 'Singapore', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SK', 'EU', 'SVK', '703', NULL, 'Slovakia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SI', 'EU', 'SVN', '705', NULL, 'Slovenia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SB', 'OC', 'SLB', '090', NULL, 'Solomon Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SO', 'AF', 'SOM', '706', NULL, 'Somalia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('ZA', 'AF', 'ZAF', '710', NULL, 'South Africa', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GS', 'AN', 'SGS', '239', NULL, 'South Georgia and the South Sandwich Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('ES', 'EU', 'ESP', '724', NULL, 'Spain', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('LK', 'AS', 'LKA', '144', NULL, 'Sri Lanka', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SD', 'AF', 'SDN', '736', NULL, 'Sudan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SS', 'AF', 'SSN', '737', NULL, 'South Sudan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SR', 'SA', 'SUR', '740', NULL, 'Suriname', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SJ', 'EU', 'SJM', '744', NULL, 'Svalbard & Jan Mayen Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SZ', 'AF', 'SWZ', '748', NULL, 'Swaziland', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SE', 'EU', 'SWE', '752', NULL, 'Sweden', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('CH', 'EU', 'CHE', '756', NULL, 'Switzerland', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('SY', 'AS', 'SYR', '760', NULL, 'Syrian Arab Republic', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TW', 'AS', 'TWN', '158', NULL, 'Taiwan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TJ', 'AS', 'TJK', '762', NULL, 'Tajikistan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TZ', 'AF', 'TZA', '834', NULL, 'Tanzania', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TH', 'AS', 'THA', '764', NULL, 'Thailand', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TL', 'AS', 'TLS', '626', NULL, 'Timor-Leste', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TG', 'AF', 'TGO', '768', NULL, 'Togo', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TK', 'OC', 'TKL', '772', NULL, 'Tokelau', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TO', 'OC', 'TON', '776', NULL, 'Tonga', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TT', 'NA', 'TTO', '780', NULL, 'Trinidad and Tobago', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TN', 'AF', 'TUN', '788', NULL, 'Tunisia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TR', 'AS', 'TUR', '792', NULL, 'Turkey', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TM', 'AS', 'TKM', '795', NULL, 'Turkmenistan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TC', 'NA', 'TCA', '796', NULL, 'Turks and Caicos Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('TV', 'OC', 'TUV', '798', NULL, 'Tuvalu', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('UG', 'AF', 'UGA', '800', NULL, 'Uganda', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('UA', 'EU', 'UKR', '804', NULL, 'Ukraine', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('AE', 'AS', 'ARE', '784', NULL, 'United Arab Emirates', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('GB', 'EU', 'GBR', '826', NULL, 'United Kingdom of Great Britain & Northern Ireland', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('US', 'NA', 'USA', '840', NULL, 'United States of America', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('UM', 'OC', 'UMI', '581', NULL, 'United States Minor Outlying Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('VI', 'NA', 'VIR', '850', NULL, 'United States Virgin Islands', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('UY', 'SA', 'URY', '858', NULL, 'Uruguay', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('UZ', 'AS', 'UZB', '860', NULL, 'Uzbekistan', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('VU', 'OC', 'VUT', '548', NULL, 'Vanuatu', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('VE', 'SA', 'VEN', '862', NULL, 'Venezuela', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('VN', 'AS', 'VNM', '704', NULL, 'Vietnam', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('WF', 'OC', 'WLF', '876', NULL, 'Wallis and Futuna', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('EH', 'AF', 'ESH', '732', NULL, 'Western Sahara', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('YE', 'AS', 'YEM', '887', NULL, 'Yemen', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('ZM', 'AF', 'ZMB', '894', NULL, 'Zambia', NULL, NULL, NULL, NULL);
INSERT INTO sys_countrys (sys_country_id, sys_continent_id, sys_country_code, sys_country_number, sys_phone_code, sys_country_name, sys_currency_name, sys_currency_cents, sys_currency_code, sys_currency_exchange) VALUES ('ZW', 'AF', 'ZWE', '716', NULL, 'Zimbabwe', NULL, NULL, NULL, NULL);


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



--
-- Name: sys_dashboard_sys_dashboard_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_dashboard_sys_dashboard_id_seq', 1, false);


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

INSERT INTO sys_emailed (sys_emailed_id, sys_email_id, org_id, table_id, table_name, email_type, emailed, created, narrative, mail_body) VALUES (1, 3, 0, 2, 'entitys', 1, false, '2017-01-04 15:42:23.231357', NULL, NULL);
INSERT INTO sys_emailed (sys_emailed_id, sys_email_id, org_id, table_id, table_name, email_type, emailed, created, narrative, mail_body) VALUES (2, 3, 0, 3, 'entitys', 1, false, '2017-01-04 15:42:23.231357', NULL, NULL);
INSERT INTO sys_emailed (sys_emailed_id, sys_email_id, org_id, table_id, table_name, email_type, emailed, created, narrative, mail_body) VALUES (3, 3, 0, 4, 'entitys', 1, false, '2017-01-04 15:42:23.231357', NULL, NULL);
INSERT INTO sys_emailed (sys_emailed_id, sys_email_id, org_id, table_id, table_name, email_type, emailed, created, narrative, mail_body) VALUES (4, 3, 0, 5, 'entitys', 1, false, '2017-01-04 15:42:23.231357', NULL, NULL);
INSERT INTO sys_emailed (sys_emailed_id, sys_email_id, org_id, table_id, table_name, email_type, emailed, created, narrative, mail_body) VALUES (5, 3, 0, 6, 'entitys', 1, false, '2017-01-04 15:42:23.231357', NULL, NULL);
INSERT INTO sys_emailed (sys_emailed_id, sys_email_id, org_id, table_id, table_name, email_type, emailed, created, narrative, mail_body) VALUES (6, 3, 0, 7, 'entitys', 1, false, '2017-01-04 15:42:23.231357', NULL, NULL);
INSERT INTO sys_emailed (sys_emailed_id, sys_email_id, org_id, table_id, table_name, email_type, emailed, created, narrative, mail_body) VALUES (7, 1, NULL, 8, 'applicant', 1, false, '2017-01-04 15:42:23.231357', NULL, NULL);
INSERT INTO sys_emailed (sys_emailed_id, sys_email_id, org_id, table_id, table_name, email_type, emailed, created, narrative, mail_body) VALUES (8, 1, NULL, 9, 'applicant', 1, false, '2017-01-04 15:42:23.231357', NULL, NULL);


--
-- Name: sys_emailed_sys_emailed_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_emailed_sys_emailed_id_seq', 8, true);


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

INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (1, 0, 1, 'Application', NULL, 'Thank you for your Application', 'Thank you {{name}} for your application.<br><br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards<br>
Human Resources Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (2, 0, 2, 'New Staff', NULL, 'HR Your credentials ', 'Hello {{name}},<br><br>
Your credentials to the HR system have been created.<br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards<br>
Human Resources Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (3, 0, 3, 'Password reset', NULL, 'Password reset', 'Hello {{name}},<br><br>
Your password has been reset to:<br><br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards<br>
Human Resources Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (4, 0, 4, 'Subscription', NULL, 'Subscription', 'Hello {{name}},<br><br>
Welcome to OpenBaraza SaaS Platform<br><br>
Your password is:<br><br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards,<br>
OpenBaraza<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (5, 0, 5, 'Subscription', NULL, 'Subscription', 'Hello {{name}},<br><br>
Your OpenBaraza SaaS Platform application has been approved<br><br>
Welcome to OpenBaraza SaaS Platform<br><br>
Regards,<br>
OpenBaraza<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (7, 0, 7, 'Payroll Generated', NULL, 'Payroll Generated', 'Hello {{name}},<br><br>
They payroll has been generated for {{narrative}}<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (8, 0, 8, 'Have a Happy Birthday', NULL, 'Have a Happy Birthday', 'Happy Birthday {{name}},<br><br>
A very happy birthday to you.<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (9, 0, 9, 'Happy Birthday', NULL, 'Happy Birthday', 'Hello HR,<br><br>
{{narrative}}.<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (10, 0, 10, 'Job Application - acknowledgement', NULL, 'Job Application', 'Hello {{name}},<br><br>
We acknowledge receipt of your job application for {{job}}<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (11, 0, 11, 'Internship Application - acknowledgement', NULL, 'Job Application', 'Hello {{name}},<br><br>
We acknowledge receipt of your Internship application<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (12, 0, 12, 'Contract Ending', NULL, 'Contract Ending - {{entity_name}}', 'Hello,<br><br>
Kindly note that the contract for {{entity_name}} is due to employment.<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (13, 1, 12, 'Contract Ending', NULL, 'Contract Ending - {{entity_name}}', 'Hello,<br><br>
Kindly note that the contract for {{entity_name}} is due to employment.<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (14, 1, 11, 'Internship Application - acknowledgement', NULL, 'Job Application', 'Hello {{name}},<br><br>
We acknowledge receipt of your Internship application<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (15, 1, 10, 'Job Application - acknowledgement', NULL, 'Job Application', 'Hello {{name}},<br><br>
We acknowledge receipt of your job application for {{job}}<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (16, 1, 9, 'Happy Birthday', NULL, 'Happy Birthday', 'Hello HR,<br><br>
{{narrative}}.<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (17, 1, 8, 'Have a Happy Birthday', NULL, 'Have a Happy Birthday', 'Happy Birthday {{name}},<br><br>
A very happy birthday to you.<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (18, 1, 7, 'Payroll Generated', NULL, 'Payroll Generated', 'Hello {{name}},<br><br>
They payroll has been generated for {{narrative}}<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (19, 1, 5, 'Subscription', NULL, 'Subscription', 'Hello {{name}},<br><br>
Your OpenBaraza SaaS Platform application has been approved<br><br>
Welcome to OpenBaraza SaaS Platform<br><br>
Regards,<br>
OpenBaraza<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (20, 1, 4, 'Subscription', NULL, 'Subscription', 'Hello {{name}},<br><br>
Welcome to OpenBaraza SaaS Platform<br><br>
Your password is:<br><br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards,<br>
OpenBaraza<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (21, 1, 3, 'Password reset', NULL, 'Password reset', 'Hello {{name}},<br><br>
Your password has been reset to:<br><br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards<br>
Human Resources Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (22, 1, 2, 'New Staff', NULL, 'HR Your credentials ', 'Hello {{name}},<br><br>
Your credentials to the HR system have been created.<br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards<br>
Human Resources Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (23, 1, 1, 'Application', NULL, 'Thank you for your Application', 'Thank you {{name}} for your application.<br><br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards<br>
Human Resources Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (24, 1, 12, 'Contract Ending', NULL, 'Contract Ending - {{entity_name}}', 'Hello,<br><br>
Kindly note that the contract for {{entity_name}} is due to employment.<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (25, 1, 11, 'Internship Application - acknowledgement', NULL, 'Job Application', 'Hello {{name}},<br><br>
We acknowledge receipt of your Internship application<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (26, 1, 10, 'Job Application - acknowledgement', NULL, 'Job Application', 'Hello {{name}},<br><br>
We acknowledge receipt of your job application for {{job}}<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (27, 1, 9, 'Happy Birthday', NULL, 'Happy Birthday', 'Hello HR,<br><br>
{{narrative}}.<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (28, 1, 8, 'Have a Happy Birthday', NULL, 'Have a Happy Birthday', 'Happy Birthday {{name}},<br><br>
A very happy birthday to you.<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (29, 1, 7, 'Payroll Generated', NULL, 'Payroll Generated', 'Hello {{name}},<br><br>
They payroll has been generated for {{narrative}}<br><br>
Regards,<br>
HR Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (30, 1, 5, 'Subscription', NULL, 'Subscription', 'Hello {{name}},<br><br>
Your OpenBaraza SaaS Platform application has been approved<br><br>
Welcome to OpenBaraza SaaS Platform<br><br>
Regards,<br>
OpenBaraza<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (31, 1, 4, 'Subscription', NULL, 'Subscription', 'Hello {{name}},<br><br>
Welcome to OpenBaraza SaaS Platform<br><br>
Your password is:<br><br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards,<br>
OpenBaraza<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (32, 1, 3, 'Password reset', NULL, 'Password reset', 'Hello {{name}},<br><br>
Your password has been reset to:<br><br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards<br>
Human Resources Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (33, 1, 2, 'New Staff', NULL, 'HR Your credentials ', 'Hello {{name}},<br><br>
Your credentials to the HR system have been created.<br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards<br>
Human Resources Manager<br>');
INSERT INTO sys_emails (sys_email_id, org_id, use_type, sys_email_name, default_email, title, details) VALUES (34, 1, 1, 'Application', NULL, 'Thank you for your Application', 'Thank you {{name}} for your application.<br><br>
Your user name is {{username}}<br> 
Your password is {{password}}<br><br>
Regards<br>
Human Resources Manager<br>');


--
-- Name: sys_emails_sys_email_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_emails_sys_email_id_seq', 34, true);


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



--
-- Name: sys_errors_sys_error_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_errors_sys_error_id_seq', 1, false);


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



--
-- Name: sys_files_sys_file_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_files_sys_file_id_seq', 1, false);


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

INSERT INTO sys_logins (sys_login_id, entity_id, login_time, login_ip, narrative) VALUES (1, 0, '2017-01-04 15:28:49.559663', '127.0.0.1', NULL);


--
-- Name: sys_logins_sys_login_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_logins_sys_login_id_seq', 1, true);


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



--
-- Name: sys_menu_msg_sys_menu_msg_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_menu_msg_sys_menu_msg_id_seq', 1, false);


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



--
-- Name: sys_news_sys_news_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_news_sys_news_id_seq', 1, false);


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



--
-- Name: sys_queries_sys_queries_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_queries_sys_queries_id_seq', 1, false);


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



--
-- Name: sys_reset_sys_reset_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('sys_reset_sys_reset_id_seq', 1, false);


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



--
-- Name: tasks_task_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('tasks_task_id_seq', 1, false);


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

INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (1, 1, 0, 10164, 10, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (2, 1, 0, 19740, 15, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (3, 1, 0, 29316, 20, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (4, 1, 0, 38892, 25, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (5, 1, 0, 10000000, 30, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (6, 2, 0, 4000, 5, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (7, 2, 0, 10000000, 0, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (8, 3, 0, 999, 0, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (9, 3, 0, 1499, 30, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (10, 3, 0, 1999, 40, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (11, 3, 0, 2999, 60, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (12, 3, 0, 3999, 80, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (13, 3, 0, 4999, 100, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (14, 3, 0, 5999, 120, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (15, 3, 0, 6999, 140, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (16, 3, 0, 7999, 160, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (17, 3, 0, 8999, 180, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (18, 3, 0, 9999, 200, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (19, 3, 0, 10999, 220, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (20, 3, 0, 11999, 240, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (21, 3, 0, 12999, 260, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (22, 3, 0, 13999, 280, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (23, 3, 0, 14999, 300, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (24, 3, 0, 1000000, 320, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (25, 4, 0, 10000000, 30, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (26, 10, 1, 10000000, 30, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (27, 9, 1, 1000000, 320, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (28, 9, 1, 14999, 300, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (29, 9, 1, 13999, 280, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (30, 9, 1, 12999, 260, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (31, 9, 1, 11999, 240, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (32, 9, 1, 10999, 220, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (33, 9, 1, 9999, 200, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (34, 9, 1, 8999, 180, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (35, 9, 1, 7999, 160, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (36, 9, 1, 6999, 140, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (37, 9, 1, 5999, 120, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (38, 9, 1, 4999, 100, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (39, 9, 1, 3999, 80, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (40, 9, 1, 2999, 60, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (41, 9, 1, 1999, 40, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (42, 9, 1, 1499, 30, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (43, 9, 1, 999, 0, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (44, 8, 1, 10000000, 0, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (45, 8, 1, 4000, 5, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (46, 7, 1, 10000000, 30, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (47, 7, 1, 38892, 25, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (48, 7, 1, 29316, 20, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (49, 7, 1, 19740, 15, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (50, 7, 1, 10164, 10, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (51, 14, 0, 235000, 0, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (52, 14, 0, 335000, 10, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (53, 14, 0, 410000, 20, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (54, 14, 0, 100000000, 10, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (55, 14, 0, 10000000, 30, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (56, 15, 0, 100000000, 5, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (57, 16, 0, 100000, 0, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (58, 16, 0, 200000, 5000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (59, 16, 0, 300000, 10000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (60, 16, 0, 400000, 20000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (61, 16, 0, 500000, 30000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (62, 16, 0, 600000, 40000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (63, 16, 0, 700000, 60000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (64, 16, 0, 800000, 70000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (65, 16, 0, 900000, 80000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (66, 16, 0, 1000000, 90000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (67, 16, 0, 1000000000, 100000, NULL);


--
-- Name: tax_rates_tax_rate_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('tax_rates_tax_rate_id_seq', 67, true);


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

INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (1, NULL, 1, 11, NULL, 0, 'PAYE', NULL, 'Get_Employee_Tax(employee_tax_type_id, 2)', 1162, 1, false, 0, false, true, true, 0, 0, '40045', '40045', true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (2, NULL, 1, 12, NULL, 0, 'NSSF', NULL, 'Get_Employee_Tax(employee_tax_type_id, 1)', 0, 0, true, 0, false, true, true, 0, 0, '40030', '40030', true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (3, NULL, 1, 12, NULL, 0, 'NHIF', NULL, 'Get_Employee_Tax(employee_tax_type_id, 1)', 0, 0, false, 0, false, false, false, 0, 0, '40035', '40035', true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (4, NULL, 1, 11, NULL, 0, 'FULL PAYE', NULL, 'Get_Employee_Tax(employee_tax_type_id, 2)', 0, 0, false, 0, false, false, false, 0, 0, '40045', '40045', false, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (5, 42000, 1, 15, NULL, 0, 'Exempt', NULL, NULL, 0, 0, false, 0, false, true, true, 0, 0, NULL, NULL, true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (6, 42000, 1, 15, NULL, 0, 'VAT', NULL, NULL, 0, 0, false, 16, false, true, true, 0, 0, NULL, NULL, true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (16, NULL, 5, 12, 'UG', 1, 'Local Service Tax', NULL, 'Get_Employee_Tax(employee_tax_type_id, 1)', 0, 0, false, 0, false, false, false, 0, 0, NULL, NULL, true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (15, NULL, 5, 12, 'UG', 1, 'NSSF', NULL, 'Get_Employee_Tax(employee_tax_type_id, 1)', 0, 0, false, 0, false, true, true, 0, 200, NULL, NULL, true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (14, NULL, 5, 11, 'UG', 1, 'PAYE', NULL, 'Get_Employee_Tax(employee_tax_type_id, 2)', 0, 1, false, 0, false, true, true, 0, 0, NULL, NULL, true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (12, 42000, 5, 15, NULL, 1, 'VAT', NULL, NULL, 0, 0, false, 16, false, true, true, 0, 0, NULL, NULL, true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (11, 42000, 5, 15, NULL, 1, 'Exempt', NULL, NULL, 0, 0, false, 0, false, true, true, 0, 0, NULL, NULL, true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (10, NULL, 5, 11, 'KE', 1, 'FULL PAYE', NULL, 'Get_Employee_Tax(employee_tax_type_id, 2)', 0, 0, false, 0, false, false, false, 0, 0, '40045', '40045', false, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (9, NULL, 5, 12, 'KE', 1, 'NHIF', NULL, 'Get_Employee_Tax(employee_tax_type_id, 1)', 0, 0, false, 0, false, false, false, 0, 0, '40035', '40035', true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (8, NULL, 5, 12, 'KE', 1, 'NSSF', NULL, 'Get_Employee_Tax(employee_tax_type_id, 1)', 0, 0, true, 0, false, true, true, 0, 0, '40030', '40030', true, NULL);
INSERT INTO tax_types (tax_type_id, account_id, currency_id, use_key_id, sys_country_id, org_id, tax_type_name, tax_type_number, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, employer_account, active, details) VALUES (7, NULL, 5, 11, 'KE', 1, 'PAYE', NULL, 'Get_Employee_Tax(employee_tax_type_id, 2)', 1162, 1, false, 0, false, true, true, 0, 0, '40045', '40045', true, NULL);


--
-- Name: tax_types_tax_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('tax_types_tax_type_id_seq', 13, true);


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



--
-- Name: tender_items_tender_item_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('tender_items_tender_item_id_seq', 1, false);


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



--
-- Name: tender_types_tender_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('tender_types_tender_type_id_seq', 1, false);


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



--
-- Name: tenders_tender_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('tenders_tender_id_seq', 1, false);


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



--
-- Name: timesheet_timesheet_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('timesheet_timesheet_id_seq', 1, false);


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



--
-- Name: trainings_training_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('trainings_training_id_seq', 1, false);


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

INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (1, 16, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (2, 14, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (3, 15, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (4, 1, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (5, 2, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (6, 3, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (7, 4, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (8, 5, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (9, 6, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (10, 7, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (11, 8, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (12, 9, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (13, 10, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (14, 11, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (15, 12, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (16, 17, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (17, 21, 0, 10001);
INSERT INTO transaction_counters (transaction_counter_id, transaction_type_id, org_id, document_number) VALUES (18, 22, 0, 10001);


--
-- Name: transaction_counters_transaction_counter_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('transaction_counters_transaction_counter_id_seq', 18, true);


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



--
-- Name: transaction_details_transaction_detail_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('transaction_details_transaction_detail_id_seq', 1, false);


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



--
-- Name: transaction_links_transaction_link_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('transaction_links_transaction_link_id_seq', 1, false);


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

INSERT INTO transaction_status (transaction_status_id, transaction_status_name) VALUES (1, 'Draft');
INSERT INTO transaction_status (transaction_status_id, transaction_status_name) VALUES (2, 'Completed');
INSERT INTO transaction_status (transaction_status_id, transaction_status_name) VALUES (3, 'Processed');
INSERT INTO transaction_status (transaction_status_id, transaction_status_name) VALUES (4, 'Archive');


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

INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (16, 'Requisitions', 'D', false, false);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (14, 'Sales Quotation', 'D', true, false);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (15, 'Purchase Quotation', 'D', false, false);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (1, 'Sales Order', 'D', true, false);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (2, 'Sales Invoice', 'D', true, true);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (3, 'Sales Template', 'D', true, false);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (4, 'Purchase Order', 'D', false, false);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (5, 'Purchase Invoice', 'D', false, true);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (6, 'Purchase Template', 'D', false, false);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (7, 'Receipts', 'D', true, true);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (8, 'Payments', 'D', false, true);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (9, 'Credit Note', 'D', true, true);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (10, 'Debit Note', 'D', false, true);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (11, 'Delivery Note', 'D', true, false);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (12, 'Receipt Note', 'D', false, false);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (17, 'Work Use', 'D', true, false);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (21, 'Direct Expenditure', 'D', true, true);
INSERT INTO transaction_types (transaction_type_id, transaction_type_name, document_prefix, for_sales, for_posting) VALUES (22, 'Direct Income', 'D', false, true);


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



--
-- Name: transactions_transaction_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('transactions_transaction_id_seq', 1, false);


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

INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (0, 'Users', 0);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (1, 'Staff', 0);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (2, 'Client', 0);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (3, 'Supplier', 0);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (4, 'Applicant', 0);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (5, 'Subscription', 0);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (11, 'Payroll Tax', 1);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (12, 'Payroll Contributions', 1);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (15, 'Transaction Tax', 2);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (23, 'Travel Cost', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (24, 'Travel Payment', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (25, 'Travel Tax', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (26, 'Salary Payment', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (27, 'Basic Salary', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (28, 'Payroll Advance', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (29, 'Staff Allowance', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (30, 'Staff Remitance', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (31, 'Staff Expenditure', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (51, 'Client Account', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (52, 'Supplier Account', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (53, 'Sales Account', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (54, 'Purchase Account', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (55, 'VAT Account', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (56, 'Suplus/Deficit', 3);
INSERT INTO use_keys (use_key_id, use_key_name, use_function) VALUES (57, 'Retained Earnings', 3);


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



--
-- Name: work_rate_changes_work_rate_change_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('work_rate_changes_work_rate_change_seq', 1, false);


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



--
-- Name: work_rates_work_rate_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('work_rates_work_rate_id_seq', 1, false);


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



--
-- Name: workflow_logs_workflow_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('workflow_logs_workflow_log_id_seq', 1, false);


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

INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (1, 1, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (2, 2, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (3, 3, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (4, 4, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (5, 5, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (6, 6, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (7, 7, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (8, 8, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (9, 8, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (10, 10, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (11, 11, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (12, 12, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (13, 13, 0, 0, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (14, 25, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (15, 24, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (16, 23, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (17, 22, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (18, 20, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (19, 20, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (20, 19, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (21, 18, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (22, 17, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (23, 16, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (24, 15, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);
INSERT INTO workflow_phases (workflow_phase_id, workflow_id, approval_entity_id, org_id, approval_level, return_level, escalation_days, escalation_hours, required_approvals, reporting_level, use_reporting, advice, notice, phase_narrative, advice_email, notice_email, advice_file, notice_file, details) VALUES (25, 14, 6, 1, 1, 0, 0, 3, 1, 1, false, false, false, 'Approve', 'For your approval', 'Phase approved', NULL, NULL, NULL);


--
-- Name: workflow_phases_workflow_phase_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('workflow_phases_workflow_phase_id_seq', 25, true);


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



--
-- Name: workflow_table_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('workflow_table_id_seq', 1, false);


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

INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (1, 0, 0, 'Budget', 'budgets', NULL, NULL, 'Request approved', 'Request rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (2, 0, 0, 'Requisition', 'transactions', NULL, NULL, 'Request approved', 'Request rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (3, 3, 0, 'Purchase Transactions', 'transactions', NULL, NULL, 'Request approved', 'Request rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (4, 2, 0, 'Sales Transactions', 'transactions', NULL, NULL, 'Request approved', 'Request rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (5, 1, 0, 'Leave', 'employee_leave', NULL, NULL, 'Leave approved', 'Leave rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (6, 5, 0, 'subscriptions', 'subscriptions', NULL, NULL, 'subscription approved', 'subscription rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (7, 1, 0, 'Claims', 'claims', NULL, NULL, 'Claims approved', 'Claims rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (8, 1, 0, 'Loan', 'loans', NULL, NULL, 'Loan approved', 'Loan rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (9, 1, 0, 'Advances', 'employee_advances', NULL, NULL, 'Advance approved', 'Advance rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (10, 4, 0, 'Hire', 'applications', NULL, NULL, 'Hire approved', 'Hire rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (11, 1, 0, 'Contract', 'applications', NULL, NULL, 'Contract approved', 'Contract rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (12, 1, 0, 'Employee Objectives', 'employee_objectives', NULL, NULL, 'Objectives approved', 'Objectives rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (13, 1, 0, 'Review Objectives', 'job_reviews', NULL, NULL, 'Review approved', 'Review rejected', NULL, NULL, NULL, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (14, 6, 1, 'Budget', 'budgets', NULL, NULL, 'Request approved', 'Request rejected', NULL, NULL, 1, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (15, 6, 1, 'Requisition', 'transactions', NULL, NULL, 'Request approved', 'Request rejected', NULL, NULL, 2, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (16, 9, 1, 'Purchase Transactions', 'transactions', NULL, NULL, 'Request approved', 'Request rejected', NULL, NULL, 3, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (17, 8, 1, 'Sales Transactions', 'transactions', NULL, NULL, 'Request approved', 'Request rejected', NULL, NULL, 4, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (18, 7, 1, 'Leave', 'employee_leave', NULL, NULL, 'Leave approved', 'Leave rejected', NULL, NULL, 5, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (19, 7, 1, 'Claims', 'claims', NULL, NULL, 'Claims approved', 'Claims rejected', NULL, NULL, 7, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (20, 7, 1, 'Loan', 'loans', NULL, NULL, 'Loan approved', 'Loan rejected', NULL, NULL, 8, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (21, 7, 1, 'Advances', 'employee_advances', NULL, NULL, 'Advance approved', 'Advance rejected', NULL, NULL, 9, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (22, 10, 1, 'Hire', 'applications', NULL, NULL, 'Hire approved', 'Hire rejected', NULL, NULL, 10, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (23, 7, 1, 'Contract', 'applications', NULL, NULL, 'Contract approved', 'Contract rejected', NULL, NULL, 11, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (24, 7, 1, 'Employee Objectives', 'employee_objectives', NULL, NULL, 'Objectives approved', 'Objectives rejected', NULL, NULL, 12, NULL);
INSERT INTO workflows (workflow_id, source_entity_id, org_id, workflow_name, table_name, table_link_field, table_link_id, approve_email, reject_email, approve_file, reject_file, link_copy, details) VALUES (25, 7, 1, 'Review Objectives', 'job_reviews', NULL, NULL, 'Review approved', 'Review rejected', NULL, NULL, 13, NULL);


--
-- Name: workflows_workflow_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('workflows_workflow_id_seq', 25, true);


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



--
-- Name: works_work_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('works_work_id_seq', 1, false);


--
-- Name: access_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY access_logs
    ADD CONSTRAINT access_logs_pkey PRIMARY KEY (access_log_id);


--
-- Name: account_class_account_class_name_org_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY account_class
    ADD CONSTRAINT account_class_account_class_name_org_id_key UNIQUE (account_class_name, org_id);


--
-- Name: account_class_account_class_no_org_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY account_class
    ADD CONSTRAINT account_class_account_class_no_org_id_key UNIQUE (account_class_no, org_id);


--
-- Name: account_class_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY account_class
    ADD CONSTRAINT account_class_pkey PRIMARY KEY (account_class_id);


--
-- Name: account_types_account_type_no_org_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY account_types
    ADD CONSTRAINT account_types_account_type_no_org_id_key UNIQUE (account_type_no, org_id);


--
-- Name: account_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY account_types
    ADD CONSTRAINT account_types_pkey PRIMARY KEY (account_type_id);


--
-- Name: accounts_account_no_org_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY accounts
    ADD CONSTRAINT accounts_account_no_org_id_key UNIQUE (account_no, org_id);


--
-- Name: accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY accounts
    ADD CONSTRAINT accounts_pkey PRIMARY KEY (account_id);


--
-- Name: address_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY address
    ADD CONSTRAINT address_pkey PRIMARY KEY (address_id);


--
-- Name: address_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY address_types
    ADD CONSTRAINT address_types_pkey PRIMARY KEY (address_type_id);


--
-- Name: adjustment_effects_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY adjustment_effects
    ADD CONSTRAINT adjustment_effects_pkey PRIMARY KEY (adjustment_effect_id);


--
-- Name: adjustments_adjustment_name_org_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY adjustments
    ADD CONSTRAINT adjustments_adjustment_name_org_id_key UNIQUE (adjustment_name, org_id);


--
-- Name: adjustments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY adjustments
    ADD CONSTRAINT adjustments_pkey PRIMARY KEY (adjustment_id);


--
-- Name: advance_deductions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY advance_deductions
    ADD CONSTRAINT advance_deductions_pkey PRIMARY KEY (advance_deduction_id);


--
-- Name: amortisation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY amortisation
    ADD CONSTRAINT amortisation_pkey PRIMARY KEY (amortisation_id);


--
-- Name: applicants_applicant_email_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY applicants
    ADD CONSTRAINT applicants_applicant_email_key UNIQUE (applicant_email);


--
-- Name: applicants_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY applicants
    ADD CONSTRAINT applicants_pkey PRIMARY KEY (entity_id);


--
-- Name: applications_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY applications
    ADD CONSTRAINT applications_pkey PRIMARY KEY (application_id);


--
-- Name: approval_checklists_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY approval_checklists
    ADD CONSTRAINT approval_checklists_pkey PRIMARY KEY (approval_checklist_id);


--
-- Name: approvals_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY approvals
    ADD CONSTRAINT approvals_pkey PRIMARY KEY (approval_id);


--
-- Name: aptitude_grades_aptitude_test_id_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY aptitude_grades
    ADD CONSTRAINT aptitude_grades_aptitude_test_id_user_id_key UNIQUE (aptitude_test_id, user_id);


--
-- Name: aptitude_grades_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY aptitude_grades
    ADD CONSTRAINT aptitude_grades_pkey PRIMARY KEY (aptitude_grade_id);


--
-- Name: aptitude_ongoing_aptitude_test_id_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY aptitude_ongoing
    ADD CONSTRAINT aptitude_ongoing_aptitude_test_id_user_id_key UNIQUE (aptitude_test_id, user_id);


--
-- Name: aptitude_ongoing_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY aptitude_ongoing
    ADD CONSTRAINT aptitude_ongoing_pkey PRIMARY KEY (aptitude_ongoing_id);


--
-- Name: aptitude_tests_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY aptitude_tests
    ADD CONSTRAINT aptitude_tests_pkey PRIMARY KEY (aptitude_test_id);


--
-- Name: asset_movement_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY asset_movement
    ADD CONSTRAINT asset_movement_pkey PRIMARY KEY (asset_movement_id);


--
-- Name: asset_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY asset_types
    ADD CONSTRAINT asset_types_pkey PRIMARY KEY (asset_type_id);


--
-- Name: asset_valuations_asset_id_valuation_year_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY asset_valuations
    ADD CONSTRAINT asset_valuations_asset_id_valuation_year_key UNIQUE (asset_id, valuation_year);


--
-- Name: asset_valuations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY asset_valuations
    ADD CONSTRAINT asset_valuations_pkey PRIMARY KEY (asset_valuation_id);


--
-- Name: assets_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY assets
    ADD CONSTRAINT assets_pkey PRIMARY KEY (asset_id);


--
-- Name: attendance_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY attendance
    ADD CONSTRAINT attendance_pkey PRIMARY KEY (attendance_id);


--
-- Name: bank_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY bank_accounts
    ADD CONSTRAINT bank_accounts_pkey PRIMARY KEY (bank_account_id);


--
-- Name: bank_branch_bank_id_bank_branch_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY bank_branch
    ADD CONSTRAINT bank_branch_bank_id_bank_branch_name_key UNIQUE (bank_id, bank_branch_name);


--
-- Name: bank_branch_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY bank_branch
    ADD CONSTRAINT bank_branch_pkey PRIMARY KEY (bank_branch_id);


--
-- Name: banks_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY banks
    ADD CONSTRAINT banks_pkey PRIMARY KEY (bank_id);


--
-- Name: bidders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY bidders
    ADD CONSTRAINT bidders_pkey PRIMARY KEY (bidder_id);


--
-- Name: bio_imports1_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY bio_imports1
    ADD CONSTRAINT bio_imports1_pkey PRIMARY KEY (bio_imports1_id);


--
-- Name: budget_lines_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY budget_lines
    ADD CONSTRAINT budget_lines_pkey PRIMARY KEY (budget_line_id);


--
-- Name: budgets_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY budgets
    ADD CONSTRAINT budgets_pkey PRIMARY KEY (budget_id);


--
-- Name: career_development_org_id_career_development_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY career_development
    ADD CONSTRAINT career_development_org_id_career_development_name_key UNIQUE (org_id, career_development_name);


--
-- Name: career_development_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY career_development
    ADD CONSTRAINT career_development_pkey PRIMARY KEY (career_development_id);


--
-- Name: case_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY case_types
    ADD CONSTRAINT case_types_pkey PRIMARY KEY (case_type_id);


--
-- Name: casual_application_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY casual_application
    ADD CONSTRAINT casual_application_pkey PRIMARY KEY (casual_application_id);


--
-- Name: casual_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY casual_category
    ADD CONSTRAINT casual_category_pkey PRIMARY KEY (casual_category_id);


--
-- Name: casuals_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY casuals
    ADD CONSTRAINT casuals_pkey PRIMARY KEY (casual_id);


--
-- Name: checklists_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY checklists
    ADD CONSTRAINT checklists_pkey PRIMARY KEY (checklist_id);


--
-- Name: claim_details_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY claim_details
    ADD CONSTRAINT claim_details_pkey PRIMARY KEY (claim_detail_id);


--
-- Name: claim_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY claim_types
    ADD CONSTRAINT claim_types_pkey PRIMARY KEY (claim_type_id);


--
-- Name: claims_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY claims
    ADD CONSTRAINT claims_pkey PRIMARY KEY (claim_id);


--
-- Name: contract_status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY contract_status
    ADD CONSTRAINT contract_status_pkey PRIMARY KEY (contract_status_id);


--
-- Name: contract_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY contract_types
    ADD CONSTRAINT contract_types_pkey PRIMARY KEY (contract_type_id);


--
-- Name: contracts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY contracts
    ADD CONSTRAINT contracts_pkey PRIMARY KEY (contract_id);


--
-- Name: currency_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY currency
    ADD CONSTRAINT currency_pkey PRIMARY KEY (currency_id);


--
-- Name: currency_rates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY currency_rates
    ADD CONSTRAINT currency_rates_pkey PRIMARY KEY (currency_rate_id);


--
-- Name: cv_projects_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY cv_projects
    ADD CONSTRAINT cv_projects_pkey PRIMARY KEY (cv_projectid);


--
-- Name: cv_seminars_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY cv_seminars
    ADD CONSTRAINT cv_seminars_pkey PRIMARY KEY (cv_seminar_id);


--
-- Name: day_works_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY day_works
    ADD CONSTRAINT day_works_pkey PRIMARY KEY (day_work_id);


--
-- Name: default_accounts_account_id_use_key_id_org_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY default_accounts
    ADD CONSTRAINT default_accounts_account_id_use_key_id_org_id_key UNIQUE (account_id, use_key_id, org_id);


--
-- Name: default_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY default_accounts
    ADD CONSTRAINT default_accounts_pkey PRIMARY KEY (default_account_id);


--
-- Name: default_adjustments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY default_adjustments
    ADD CONSTRAINT default_adjustments_pkey PRIMARY KEY (default_adjustment_id);


--
-- Name: default_banking_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY default_banking
    ADD CONSTRAINT default_banking_pkey PRIMARY KEY (default_banking_id);


--
-- Name: default_tax_types_entity_id_tax_type_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY default_tax_types
    ADD CONSTRAINT default_tax_types_entity_id_tax_type_id_key UNIQUE (entity_id, tax_type_id);


--
-- Name: default_tax_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY default_tax_types
    ADD CONSTRAINT default_tax_types_pkey PRIMARY KEY (default_tax_type_id);


--
-- Name: define_phases_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY define_phases
    ADD CONSTRAINT define_phases_pkey PRIMARY KEY (define_phase_id);


--
-- Name: define_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY define_tasks
    ADD CONSTRAINT define_tasks_pkey PRIMARY KEY (define_task_id);


--
-- Name: department_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY department_roles
    ADD CONSTRAINT department_roles_pkey PRIMARY KEY (department_role_id);


--
-- Name: departments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY departments
    ADD CONSTRAINT departments_pkey PRIMARY KEY (department_id);


--
-- Name: disability_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY disability
    ADD CONSTRAINT disability_pkey PRIMARY KEY (disability_id);


--
-- Name: education_class_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY education_class
    ADD CONSTRAINT education_class_pkey PRIMARY KEY (education_class_id);


--
-- Name: education_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY education
    ADD CONSTRAINT education_pkey PRIMARY KEY (education_id);


--
-- Name: employee_adjustments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_adjustments
    ADD CONSTRAINT employee_adjustments_pkey PRIMARY KEY (employee_adjustment_id);


--
-- Name: employee_advances_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_advances
    ADD CONSTRAINT employee_advances_pkey PRIMARY KEY (employee_advance_id);


--
-- Name: employee_banking_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_banking
    ADD CONSTRAINT employee_banking_pkey PRIMARY KEY (employee_banking_id);


--
-- Name: employee_cases_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_cases
    ADD CONSTRAINT employee_cases_pkey PRIMARY KEY (employee_case_id);


--
-- Name: employee_leave_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_leave
    ADD CONSTRAINT employee_leave_pkey PRIMARY KEY (employee_leave_id);


--
-- Name: employee_leave_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_leave_types
    ADD CONSTRAINT employee_leave_types_pkey PRIMARY KEY (employee_leave_type_id);


--
-- Name: employee_month_entity_id_period_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_month
    ADD CONSTRAINT employee_month_entity_id_period_id_key UNIQUE (entity_id, period_id);


--
-- Name: employee_month_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_month
    ADD CONSTRAINT employee_month_pkey PRIMARY KEY (employee_month_id);


--
-- Name: employee_objectives_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_objectives
    ADD CONSTRAINT employee_objectives_pkey PRIMARY KEY (employee_objective_id);


--
-- Name: employee_overtime_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_overtime
    ADD CONSTRAINT employee_overtime_pkey PRIMARY KEY (employee_overtime_id);


--
-- Name: employee_per_diem_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_per_diem
    ADD CONSTRAINT employee_per_diem_pkey PRIMARY KEY (employee_per_diem_id);


--
-- Name: employee_tax_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_tax_types
    ADD CONSTRAINT employee_tax_types_pkey PRIMARY KEY (employee_tax_type_id);


--
-- Name: employee_trainings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employee_trainings
    ADD CONSTRAINT employee_trainings_pkey PRIMARY KEY (employee_training_id);


--
-- Name: employees_org_id_employee_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_org_id_employee_id_key UNIQUE (org_id, employee_id);


--
-- Name: employees_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_pkey PRIMARY KEY (entity_id);


--
-- Name: employment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY employment
    ADD CONSTRAINT employment_pkey PRIMARY KEY (employment_id);


--
-- Name: entity_subscriptions_entity_id_entity_type_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY entity_subscriptions
    ADD CONSTRAINT entity_subscriptions_entity_id_entity_type_id_key UNIQUE (entity_id, entity_type_id);


--
-- Name: entity_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY entity_subscriptions
    ADD CONSTRAINT entity_subscriptions_pkey PRIMARY KEY (entity_subscription_id);


--
-- Name: entity_types_org_id_entity_type_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY entity_types
    ADD CONSTRAINT entity_types_org_id_entity_type_name_key UNIQUE (org_id, entity_type_name);


--
-- Name: entity_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY entity_types
    ADD CONSTRAINT entity_types_pkey PRIMARY KEY (entity_type_id);


--
-- Name: entitys_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY entitys
    ADD CONSTRAINT entitys_pkey PRIMARY KEY (entity_id);


--
-- Name: entitys_user_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY entitys
    ADD CONSTRAINT entitys_user_name_key UNIQUE (user_name);


--
-- Name: entry_forms_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY entry_forms
    ADD CONSTRAINT entry_forms_pkey PRIMARY KEY (entry_form_id);


--
-- Name: evaluation_points_org_id_job_review_id_review_point_id_obje_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY evaluation_points
    ADD CONSTRAINT evaluation_points_org_id_job_review_id_review_point_id_obje_key UNIQUE (org_id, job_review_id, review_point_id, objective_id, career_development_id);


--
-- Name: evaluation_points_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY evaluation_points
    ADD CONSTRAINT evaluation_points_pkey PRIMARY KEY (evaluation_point_id);


--
-- Name: farm_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY farm_fields
    ADD CONSTRAINT farm_fields_pkey PRIMARY KEY (farm_field_id);


--
-- Name: fields_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY fields
    ADD CONSTRAINT fields_pkey PRIMARY KEY (field_id);


--
-- Name: fiscal_years_fiscal_year_org_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY fiscal_years
    ADD CONSTRAINT fiscal_years_fiscal_year_org_id_key UNIQUE (fiscal_year, org_id);


--
-- Name: fiscal_years_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY fiscal_years
    ADD CONSTRAINT fiscal_years_pkey PRIMARY KEY (fiscal_year_id);


--
-- Name: follow_up_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY follow_up
    ADD CONSTRAINT follow_up_pkey PRIMARY KEY (follow_up_id);


--
-- Name: forms_form_name_version_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY forms
    ADD CONSTRAINT forms_form_name_version_key UNIQUE (form_name, version);


--
-- Name: forms_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY forms
    ADD CONSTRAINT forms_pkey PRIMARY KEY (form_id);


--
-- Name: gls_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY gls
    ADD CONSTRAINT gls_pkey PRIMARY KEY (gl_id);


--
-- Name: helpdesk_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY helpdesk
    ADD CONSTRAINT helpdesk_pkey PRIMARY KEY (helpdesk_id);


--
-- Name: holidays_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY holidays
    ADD CONSTRAINT holidays_pkey PRIMARY KEY (holiday_id);


--
-- Name: identification_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY identification_types
    ADD CONSTRAINT identification_types_pkey PRIMARY KEY (identification_type_id);


--
-- Name: identifications_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY identifications
    ADD CONSTRAINT identifications_pkey PRIMARY KEY (identification_id);


--
-- Name: industry_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY industry
    ADD CONSTRAINT industry_pkey PRIMARY KEY (industry_id);


--
-- Name: intake_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY intake
    ADD CONSTRAINT intake_pkey PRIMARY KEY (intake_id);


--
-- Name: interns_internship_id_entity_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY interns
    ADD CONSTRAINT interns_internship_id_entity_id_key UNIQUE (internship_id, entity_id);


--
-- Name: interns_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY interns
    ADD CONSTRAINT interns_pkey PRIMARY KEY (intern_id);


--
-- Name: internships_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY internships
    ADD CONSTRAINT internships_pkey PRIMARY KEY (internship_id);


--
-- Name: item_category_org_id_item_category_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY item_category
    ADD CONSTRAINT item_category_org_id_item_category_name_key UNIQUE (org_id, item_category_name);


--
-- Name: item_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY item_category
    ADD CONSTRAINT item_category_pkey PRIMARY KEY (item_category_id);


--
-- Name: item_units_org_id_item_unit_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY item_units
    ADD CONSTRAINT item_units_org_id_item_unit_name_key UNIQUE (org_id, item_unit_name);


--
-- Name: item_units_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY item_units
    ADD CONSTRAINT item_units_pkey PRIMARY KEY (item_unit_id);


--
-- Name: items_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY items
    ADD CONSTRAINT items_pkey PRIMARY KEY (item_id);


--
-- Name: job_reviews_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY job_reviews
    ADD CONSTRAINT job_reviews_pkey PRIMARY KEY (job_review_id);


--
-- Name: jobs_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY jobs_category
    ADD CONSTRAINT jobs_category_pkey PRIMARY KEY (jobs_category_id);


--
-- Name: journals_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY journals
    ADD CONSTRAINT journals_pkey PRIMARY KEY (journal_id);


--
-- Name: kin_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY kin_types
    ADD CONSTRAINT kin_types_pkey PRIMARY KEY (kin_type_id);


--
-- Name: kins_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY kins
    ADD CONSTRAINT kins_pkey PRIMARY KEY (kin_id);


--
-- Name: lead_items_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY lead_items
    ADD CONSTRAINT lead_items_pkey PRIMARY KEY (lead_item_id);


--
-- Name: leads_business_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY leads
    ADD CONSTRAINT leads_business_name_key UNIQUE (business_name);


--
-- Name: leads_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY leads
    ADD CONSTRAINT leads_pkey PRIMARY KEY (lead_id);


--
-- Name: leave_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY leave_types
    ADD CONSTRAINT leave_types_pkey PRIMARY KEY (leave_type_id);


--
-- Name: leave_work_days_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY leave_work_days
    ADD CONSTRAINT leave_work_days_pkey PRIMARY KEY (leave_work_day_id);


--
-- Name: ledger_links_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY ledger_links
    ADD CONSTRAINT ledger_links_pkey PRIMARY KEY (ledger_link_id);


--
-- Name: ledger_types_org_id_ledger_type_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY ledger_types
    ADD CONSTRAINT ledger_types_org_id_ledger_type_name_key UNIQUE (org_id, ledger_type_name);


--
-- Name: ledger_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY ledger_types
    ADD CONSTRAINT ledger_types_pkey PRIMARY KEY (ledger_type_id);


--
-- Name: loan_monthly_loan_id_period_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY loan_monthly
    ADD CONSTRAINT loan_monthly_loan_id_period_id_key UNIQUE (loan_id, period_id);


--
-- Name: loan_monthly_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY loan_monthly
    ADD CONSTRAINT loan_monthly_pkey PRIMARY KEY (loan_month_id);


--
-- Name: loan_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY loan_types
    ADD CONSTRAINT loan_types_pkey PRIMARY KEY (loan_type_id);


--
-- Name: loans_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY loans
    ADD CONSTRAINT loans_pkey PRIMARY KEY (loan_id);


--
-- Name: locations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY locations
    ADD CONSTRAINT locations_pkey PRIMARY KEY (location_id);


--
-- Name: objective_details_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY objective_details
    ADD CONSTRAINT objective_details_pkey PRIMARY KEY (objective_detail_id);


--
-- Name: objective_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY objective_types
    ADD CONSTRAINT objective_types_pkey PRIMARY KEY (objective_type_id);


--
-- Name: objectives_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY objectives
    ADD CONSTRAINT objectives_pkey PRIMARY KEY (objective_id);


--
-- Name: org_events_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY org_events
    ADD CONSTRAINT org_events_pkey PRIMARY KEY (org_event_id);


--
-- Name: orgs_org_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY orgs
    ADD CONSTRAINT orgs_org_name_key UNIQUE (org_name);


--
-- Name: orgs_org_sufix_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY orgs
    ADD CONSTRAINT orgs_org_sufix_key UNIQUE (org_sufix);


--
-- Name: orgs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY orgs
    ADD CONSTRAINT orgs_pkey PRIMARY KEY (org_id);


--
-- Name: pay_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pay_groups
    ADD CONSTRAINT pay_groups_pkey PRIMARY KEY (pay_group_id);


--
-- Name: pay_scale_steps_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pay_scale_steps
    ADD CONSTRAINT pay_scale_steps_pkey PRIMARY KEY (pay_scale_step_id);


--
-- Name: pay_scale_years_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pay_scale_years
    ADD CONSTRAINT pay_scale_years_pkey PRIMARY KEY (pay_scale_year_id);


--
-- Name: pay_scales_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pay_scales
    ADD CONSTRAINT pay_scales_pkey PRIMARY KEY (pay_scale_id);


--
-- Name: pc_allocations_period_id_department_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_allocations
    ADD CONSTRAINT pc_allocations_period_id_department_id_key UNIQUE (period_id, department_id);


--
-- Name: pc_allocations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_allocations
    ADD CONSTRAINT pc_allocations_pkey PRIMARY KEY (pc_allocation_id);


--
-- Name: pc_banking_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_banking
    ADD CONSTRAINT pc_banking_pkey PRIMARY KEY (pc_banking_id);


--
-- Name: pc_budget_pc_allocation_id_pc_item_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_budget
    ADD CONSTRAINT pc_budget_pc_allocation_id_pc_item_id_key UNIQUE (pc_allocation_id, pc_item_id);


--
-- Name: pc_budget_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_budget
    ADD CONSTRAINT pc_budget_pkey PRIMARY KEY (pc_budget_id);


--
-- Name: pc_category_pc_category_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_category
    ADD CONSTRAINT pc_category_pc_category_name_key UNIQUE (pc_category_name);


--
-- Name: pc_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_category
    ADD CONSTRAINT pc_category_pkey PRIMARY KEY (pc_category_id);


--
-- Name: pc_expenditure_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_expenditure
    ADD CONSTRAINT pc_expenditure_pkey PRIMARY KEY (pc_expenditure_id);


--
-- Name: pc_items_pc_item_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_items
    ADD CONSTRAINT pc_items_pc_item_name_key UNIQUE (pc_item_name);


--
-- Name: pc_items_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_items
    ADD CONSTRAINT pc_items_pkey PRIMARY KEY (pc_item_id);


--
-- Name: pc_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pc_types
    ADD CONSTRAINT pc_types_pkey PRIMARY KEY (pc_type_id);


--
-- Name: pdefinitions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pdefinitions
    ADD CONSTRAINT pdefinitions_pkey PRIMARY KEY (pdefinition_id);


--
-- Name: pensions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY pensions
    ADD CONSTRAINT pensions_pkey PRIMARY KEY (pension_id);


--
-- Name: period_tax_rates_period_tax_type_id_tax_rate_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY period_tax_rates
    ADD CONSTRAINT period_tax_rates_period_tax_type_id_tax_rate_id_key UNIQUE (period_tax_type_id, tax_rate_id);


--
-- Name: period_tax_rates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY period_tax_rates
    ADD CONSTRAINT period_tax_rates_pkey PRIMARY KEY (period_tax_rate_id);


--
-- Name: period_tax_types_period_id_tax_type_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY period_tax_types
    ADD CONSTRAINT period_tax_types_period_id_tax_type_id_key UNIQUE (period_id, tax_type_id);


--
-- Name: period_tax_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY period_tax_types
    ADD CONSTRAINT period_tax_types_pkey PRIMARY KEY (period_tax_type_id);


--
-- Name: periods_org_id_start_date_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY periods
    ADD CONSTRAINT periods_org_id_start_date_key UNIQUE (org_id, start_date);


--
-- Name: periods_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY periods
    ADD CONSTRAINT periods_pkey PRIMARY KEY (period_id);


--
-- Name: phases_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY phases
    ADD CONSTRAINT phases_pkey PRIMARY KEY (phase_id);


--
-- Name: plevels_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY plevels
    ADD CONSTRAINT plevels_pkey PRIMARY KEY (plevel_id);


--
-- Name: plevels_plevel_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY plevels
    ADD CONSTRAINT plevels_plevel_name_key UNIQUE (plevel_name);


--
-- Name: product_receipts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY product_receipts
    ADD CONSTRAINT product_receipts_pkey PRIMARY KEY (product_receipt_id);


--
-- Name: productions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY productions
    ADD CONSTRAINT productions_pkey PRIMARY KEY (production_id);


--
-- Name: products_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY products
    ADD CONSTRAINT products_pkey PRIMARY KEY (product_id);


--
-- Name: project_cost_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY project_cost
    ADD CONSTRAINT project_cost_pkey PRIMARY KEY (project_cost_id);


--
-- Name: project_staff_costs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY project_staff_costs
    ADD CONSTRAINT project_staff_costs_pkey PRIMARY KEY (project_staff_cost_id);


--
-- Name: project_staff_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY project_staff
    ADD CONSTRAINT project_staff_pkey PRIMARY KEY (project_staff_id);


--
-- Name: project_staff_project_id_entity_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY project_staff
    ADD CONSTRAINT project_staff_project_id_entity_id_key UNIQUE (project_id, entity_id);


--
-- Name: project_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY project_types
    ADD CONSTRAINT project_types_pkey PRIMARY KEY (project_type_id);


--
-- Name: project_types_project_type_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY project_types
    ADD CONSTRAINT project_types_project_type_name_key UNIQUE (project_type_name);


--
-- Name: projects_entity_id_project_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY projects
    ADD CONSTRAINT projects_entity_id_project_name_key UNIQUE (entity_id, project_name);


--
-- Name: projects_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY projects
    ADD CONSTRAINT projects_pkey PRIMARY KEY (project_id);


--
-- Name: ptypes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY ptypes
    ADD CONSTRAINT ptypes_pkey PRIMARY KEY (ptype_id);


--
-- Name: quotations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY quotations
    ADD CONSTRAINT quotations_pkey PRIMARY KEY (quotation_id);


--
-- Name: receipt_sources_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY receipt_sources
    ADD CONSTRAINT receipt_sources_pkey PRIMARY KEY (receipt_source_id);


--
-- Name: reporting_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY reporting
    ADD CONSTRAINT reporting_pkey PRIMARY KEY (reporting_id);


--
-- Name: review_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY review_category
    ADD CONSTRAINT review_category_pkey PRIMARY KEY (review_category_id);


--
-- Name: review_points_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY review_points
    ADD CONSTRAINT review_points_pkey PRIMARY KEY (review_point_id);


--
-- Name: shift_schedule_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY shift_schedule
    ADD CONSTRAINT shift_schedule_pkey PRIMARY KEY (shift_schedule_id);


--
-- Name: shifts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY shifts
    ADD CONSTRAINT shifts_pkey PRIMARY KEY (shift_id);


--
-- Name: skill_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY skill_category
    ADD CONSTRAINT skill_category_pkey PRIMARY KEY (skill_category_id);


--
-- Name: skill_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY skill_types
    ADD CONSTRAINT skill_types_pkey PRIMARY KEY (skill_type_id);


--
-- Name: skills_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY skills
    ADD CONSTRAINT skills_pkey PRIMARY KEY (skill_id);


--
-- Name: stock_lines_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stock_lines
    ADD CONSTRAINT stock_lines_pkey PRIMARY KEY (stock_line_id);


--
-- Name: stocks_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stocks
    ADD CONSTRAINT stocks_pkey PRIMARY KEY (stock_id);


--
-- Name: stores_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stores
    ADD CONSTRAINT stores_pkey PRIMARY KEY (store_id);


--
-- Name: sub_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sub_fields
    ADD CONSTRAINT sub_fields_pkey PRIMARY KEY (sub_field_id);


--
-- Name: subscription_levels_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY subscription_levels
    ADD CONSTRAINT subscription_levels_pkey PRIMARY KEY (subscription_level_id);


--
-- Name: subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY subscriptions
    ADD CONSTRAINT subscriptions_pkey PRIMARY KEY (subscription_id);


--
-- Name: sys_audit_details_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_audit_details
    ADD CONSTRAINT sys_audit_details_pkey PRIMARY KEY (sys_audit_trail_id);


--
-- Name: sys_audit_trail_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_audit_trail
    ADD CONSTRAINT sys_audit_trail_pkey PRIMARY KEY (sys_audit_trail_id);


--
-- Name: sys_continents_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_continents
    ADD CONSTRAINT sys_continents_pkey PRIMARY KEY (sys_continent_id);


--
-- Name: sys_continents_sys_continent_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_continents
    ADD CONSTRAINT sys_continents_sys_continent_name_key UNIQUE (sys_continent_name);


--
-- Name: sys_countrys_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_countrys
    ADD CONSTRAINT sys_countrys_pkey PRIMARY KEY (sys_country_id);


--
-- Name: sys_countrys_sys_country_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_countrys
    ADD CONSTRAINT sys_countrys_sys_country_name_key UNIQUE (sys_country_name);


--
-- Name: sys_dashboard_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_dashboard
    ADD CONSTRAINT sys_dashboard_pkey PRIMARY KEY (sys_dashboard_id);


--
-- Name: sys_emailed_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_emailed
    ADD CONSTRAINT sys_emailed_pkey PRIMARY KEY (sys_emailed_id);


--
-- Name: sys_emails_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_emails
    ADD CONSTRAINT sys_emails_pkey PRIMARY KEY (sys_email_id);


--
-- Name: sys_errors_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_errors
    ADD CONSTRAINT sys_errors_pkey PRIMARY KEY (sys_error_id);


--
-- Name: sys_files_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_files
    ADD CONSTRAINT sys_files_pkey PRIMARY KEY (sys_file_id);


--
-- Name: sys_logins_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_logins
    ADD CONSTRAINT sys_logins_pkey PRIMARY KEY (sys_login_id);


--
-- Name: sys_menu_msg_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_menu_msg
    ADD CONSTRAINT sys_menu_msg_pkey PRIMARY KEY (sys_menu_msg_id);


--
-- Name: sys_news_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_news
    ADD CONSTRAINT sys_news_pkey PRIMARY KEY (sys_news_id);


--
-- Name: sys_queries_org_id_sys_query_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_queries
    ADD CONSTRAINT sys_queries_org_id_sys_query_name_key UNIQUE (org_id, sys_query_name);


--
-- Name: sys_queries_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_queries
    ADD CONSTRAINT sys_queries_pkey PRIMARY KEY (sys_queries_id);


--
-- Name: sys_reset_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY sys_reset
    ADD CONSTRAINT sys_reset_pkey PRIMARY KEY (sys_reset_id);


--
-- Name: tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tasks
    ADD CONSTRAINT tasks_pkey PRIMARY KEY (task_id);


--
-- Name: tax_rates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tax_rates
    ADD CONSTRAINT tax_rates_pkey PRIMARY KEY (tax_rate_id);


--
-- Name: tax_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tax_types
    ADD CONSTRAINT tax_types_pkey PRIMARY KEY (tax_type_id);


--
-- Name: tax_types_tax_type_name_org_id_sys_country_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tax_types
    ADD CONSTRAINT tax_types_tax_type_name_org_id_sys_country_id_key UNIQUE (tax_type_name, org_id, sys_country_id);


--
-- Name: tender_items_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tender_items
    ADD CONSTRAINT tender_items_pkey PRIMARY KEY (tender_item_id);


--
-- Name: tender_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tender_types
    ADD CONSTRAINT tender_types_pkey PRIMARY KEY (tender_type_id);


--
-- Name: tender_types_tender_type_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tender_types
    ADD CONSTRAINT tender_types_tender_type_name_key UNIQUE (tender_type_name);


--
-- Name: tenders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tenders
    ADD CONSTRAINT tenders_pkey PRIMARY KEY (tender_id);


--
-- Name: timesheet_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY timesheet
    ADD CONSTRAINT timesheet_pkey PRIMARY KEY (timesheet_id);


--
-- Name: trainings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY trainings
    ADD CONSTRAINT trainings_pkey PRIMARY KEY (training_id);


--
-- Name: transaction_counters_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY transaction_counters
    ADD CONSTRAINT transaction_counters_pkey PRIMARY KEY (transaction_counter_id);


--
-- Name: transaction_details_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY transaction_details
    ADD CONSTRAINT transaction_details_pkey PRIMARY KEY (transaction_detail_id);


--
-- Name: transaction_links_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY transaction_links
    ADD CONSTRAINT transaction_links_pkey PRIMARY KEY (transaction_link_id);


--
-- Name: transaction_status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY transaction_status
    ADD CONSTRAINT transaction_status_pkey PRIMARY KEY (transaction_status_id);


--
-- Name: transaction_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY transaction_types
    ADD CONSTRAINT transaction_types_pkey PRIMARY KEY (transaction_type_id);


--
-- Name: transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_pkey PRIMARY KEY (transaction_id);


--
-- Name: use_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY use_keys
    ADD CONSTRAINT use_keys_pkey PRIMARY KEY (use_key_id);


--
-- Name: work_rate_changes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY work_rate_changes
    ADD CONSTRAINT work_rate_changes_pkey PRIMARY KEY (work_rate_change);


--
-- Name: work_rates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY work_rates
    ADD CONSTRAINT work_rates_pkey PRIMARY KEY (work_rate_id);


--
-- Name: workflow_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY workflow_logs
    ADD CONSTRAINT workflow_logs_pkey PRIMARY KEY (workflow_log_id);


--
-- Name: workflow_phases_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY workflow_phases
    ADD CONSTRAINT workflow_phases_pkey PRIMARY KEY (workflow_phase_id);


--
-- Name: workflow_sql_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY workflow_sql
    ADD CONSTRAINT workflow_sql_pkey PRIMARY KEY (workflow_sql_id);


--
-- Name: workflows_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY workflows
    ADD CONSTRAINT workflows_pkey PRIMARY KEY (workflow_id);


--
-- Name: works_day_work_id_entity_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY works
    ADD CONSTRAINT works_day_work_id_entity_id_key UNIQUE (day_work_id, entity_id);


--
-- Name: works_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY works
    ADD CONSTRAINT works_pkey PRIMARY KEY (work_id);


--
-- Name: access_logs_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX access_logs_entity_id ON access_logs USING btree (entity_id);


--
-- Name: access_logs_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX access_logs_org_id ON access_logs USING btree (org_id);


--
-- Name: account_class_chat_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX account_class_chat_type_id ON account_class USING btree (chat_type_id);


--
-- Name: account_class_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX account_class_org_id ON account_class USING btree (org_id);


--
-- Name: account_types_account_class_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX account_types_account_class_id ON account_types USING btree (account_class_id);


--
-- Name: account_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX account_types_org_id ON account_types USING btree (org_id);


--
-- Name: accounts_account_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX accounts_account_type_id ON accounts USING btree (account_type_id);


--
-- Name: accounts_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX accounts_org_id ON accounts USING btree (org_id);


--
-- Name: address_address_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX address_address_type_id ON address USING btree (address_type_id);


--
-- Name: address_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX address_org_id ON address USING btree (org_id);


--
-- Name: address_sys_country_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX address_sys_country_id ON address USING btree (sys_country_id);


--
-- Name: address_table_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX address_table_id ON address USING btree (table_id);


--
-- Name: address_table_name; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX address_table_name ON address USING btree (table_name);


--
-- Name: address_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX address_types_org_id ON address_types USING btree (org_id);


--
-- Name: adjustments_adjustment_effect_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX adjustments_adjustment_effect_id ON adjustments USING btree (adjustment_effect_id);


--
-- Name: adjustments_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX adjustments_currency_id ON adjustments USING btree (currency_id);


--
-- Name: adjustments_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX adjustments_org_id ON adjustments USING btree (org_id);


--
-- Name: advance_deductions_employee_month_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX advance_deductions_employee_month_id ON advance_deductions USING btree (employee_month_id);


--
-- Name: advance_deductions_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX advance_deductions_org_id ON advance_deductions USING btree (org_id);


--
-- Name: amortisation_asset_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX amortisation_asset_id ON amortisation USING btree (asset_id);


--
-- Name: applicants_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX applicants_currency_id ON applicants USING btree (currency_id);


--
-- Name: applicants_disability_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX applicants_disability_id ON applicants USING btree (disability_id);


--
-- Name: applicants_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX applicants_org_id ON applicants USING btree (org_id);


--
-- Name: applications_contract_status_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX applications_contract_status_id ON applications USING btree (contract_status_id);


--
-- Name: applications_contract_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX applications_contract_type_id ON applications USING btree (contract_type_id);


--
-- Name: applications_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX applications_currency_id ON applications USING btree (currency_id);


--
-- Name: applications_employee_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX applications_employee_id ON applications USING btree (employee_id);


--
-- Name: applications_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX applications_entity_id ON applications USING btree (entity_id);


--
-- Name: applications_intake_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX applications_intake_id ON applications USING btree (intake_id);


--
-- Name: applications_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX applications_org_id ON applications USING btree (org_id);


--
-- Name: approval_checklists_approval_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX approval_checklists_approval_id ON approval_checklists USING btree (approval_id);


--
-- Name: approval_checklists_checklist_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX approval_checklists_checklist_id ON approval_checklists USING btree (checklist_id);


--
-- Name: approval_checklists_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX approval_checklists_org_id ON approval_checklists USING btree (org_id);


--
-- Name: approvals_app_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX approvals_app_entity_id ON approvals USING btree (app_entity_id);


--
-- Name: approvals_approve_status; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX approvals_approve_status ON approvals USING btree (approve_status);


--
-- Name: approvals_forward_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX approvals_forward_id ON approvals USING btree (forward_id);


--
-- Name: approvals_org_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX approvals_org_entity_id ON approvals USING btree (org_entity_id);


--
-- Name: approvals_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX approvals_org_id ON approvals USING btree (org_id);


--
-- Name: approvals_table_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX approvals_table_id ON approvals USING btree (table_id);


--
-- Name: approvals_workflow_phase_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX approvals_workflow_phase_id ON approvals USING btree (workflow_phase_id);


--
-- Name: aptitude_grades_aptitude_test_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX aptitude_grades_aptitude_test_id ON aptitude_grades USING btree (aptitude_test_id);


--
-- Name: aptitude_grades_graded_by; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX aptitude_grades_graded_by ON aptitude_grades USING btree (graded_by);


--
-- Name: aptitude_grades_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX aptitude_grades_org_id ON aptitude_grades USING btree (org_id);


--
-- Name: aptitude_grades_user_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX aptitude_grades_user_id ON aptitude_grades USING btree (user_id);


--
-- Name: aptitude_tests_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX aptitude_tests_org_id ON aptitude_tests USING btree (org_id);


--
-- Name: asset_movement_asset_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX asset_movement_asset_id ON asset_movement USING btree (asset_id);


--
-- Name: asset_movement_department_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX asset_movement_department_id ON asset_movement USING btree (department_id);


--
-- Name: asset_types_accumulated_account; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX asset_types_accumulated_account ON asset_types USING btree (accumulated_account);


--
-- Name: asset_types_asset_account; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX asset_types_asset_account ON asset_types USING btree (asset_account);


--
-- Name: asset_types_depreciation_account; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX asset_types_depreciation_account ON asset_types USING btree (depreciation_account);


--
-- Name: asset_types_disposal_account; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX asset_types_disposal_account ON asset_types USING btree (disposal_account);


--
-- Name: asset_types_valuation_account; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX asset_types_valuation_account ON asset_types USING btree (valuation_account);


--
-- Name: asset_valuations_asset_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX asset_valuations_asset_id ON asset_valuations USING btree (asset_id);


--
-- Name: assets_asset_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX assets_asset_type_id ON assets USING btree (asset_type_id);


--
-- Name: assets_item_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX assets_item_id ON assets USING btree (item_id);


--
-- Name: attendance_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX attendance_entity_id ON attendance USING btree (entity_id);


--
-- Name: attendance_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX attendance_org_id ON attendance USING btree (org_id);


--
-- Name: bank_accounts_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX bank_accounts_account_id ON bank_accounts USING btree (account_id);


--
-- Name: bank_accounts_bank_branch_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX bank_accounts_bank_branch_id ON bank_accounts USING btree (bank_branch_id);


--
-- Name: bank_accounts_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX bank_accounts_currency_id ON bank_accounts USING btree (currency_id);


--
-- Name: bank_accounts_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX bank_accounts_org_id ON bank_accounts USING btree (org_id);


--
-- Name: bank_branch_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX bank_branch_org_id ON bank_branch USING btree (org_id);


--
-- Name: banks_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX banks_org_id ON banks USING btree (org_id);


--
-- Name: bidders_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX bidders_entity_id ON bidders USING btree (entity_id);


--
-- Name: bidders_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX bidders_org_id ON bidders USING btree (org_id);


--
-- Name: bidders_tender_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX bidders_tender_id ON bidders USING btree (tender_id);


--
-- Name: bio_imports1_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX bio_imports1_org_id ON bio_imports1 USING btree (org_id);


--
-- Name: branch_bankid; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX branch_bankid ON bank_branch USING btree (bank_id);


--
-- Name: budget_lines_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX budget_lines_account_id ON budget_lines USING btree (account_id);


--
-- Name: budget_lines_budget_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX budget_lines_budget_id ON budget_lines USING btree (budget_id);


--
-- Name: budget_lines_item_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX budget_lines_item_id ON budget_lines USING btree (item_id);


--
-- Name: budget_lines_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX budget_lines_org_id ON budget_lines USING btree (org_id);


--
-- Name: budget_lines_period_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX budget_lines_period_id ON budget_lines USING btree (period_id);


--
-- Name: budget_lines_transaction_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX budget_lines_transaction_id ON budget_lines USING btree (transaction_id);


--
-- Name: budgets_department_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX budgets_department_id ON budgets USING btree (department_id);


--
-- Name: budgets_fiscal_year_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX budgets_fiscal_year_id ON budgets USING btree (fiscal_year_id);


--
-- Name: budgets_link_budget_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX budgets_link_budget_id ON budgets USING btree (link_budget_id);


--
-- Name: budgets_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX budgets_org_id ON budgets USING btree (org_id);


--
-- Name: career_development_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX career_development_org_id ON career_development USING btree (org_id);


--
-- Name: case_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX case_types_org_id ON case_types USING btree (org_id);


--
-- Name: casual_application_category_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX casual_application_category_id ON casual_application USING btree (casual_category_id);


--
-- Name: casual_application_department_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX casual_application_department_id ON casual_application USING btree (department_id);


--
-- Name: casual_application_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX casual_application_entity_id ON casual_application USING btree (entity_id);


--
-- Name: casual_application_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX casual_application_org_id ON casual_application USING btree (org_id);


--
-- Name: casual_category_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX casual_category_org_id ON casual_category USING btree (org_id);


--
-- Name: casuals_casual_application_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX casuals_casual_application_id ON casuals USING btree (casual_application_id);


--
-- Name: casuals_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX casuals_entity_id ON casuals USING btree (entity_id);


--
-- Name: casuals_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX casuals_org_id ON casuals USING btree (org_id);


--
-- Name: checklists_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX checklists_org_id ON checklists USING btree (org_id);


--
-- Name: checklists_workflow_phase_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX checklists_workflow_phase_id ON checklists USING btree (workflow_phase_id);


--
-- Name: claim_details_claim_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX claim_details_claim_id ON claim_details USING btree (claim_id);


--
-- Name: claim_details_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX claim_details_currency_id ON claim_details USING btree (currency_id);


--
-- Name: claim_details_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX claim_details_org_id ON claim_details USING btree (org_id);


--
-- Name: claim_types_adjustment_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX claim_types_adjustment_id ON claim_types USING btree (adjustment_id);


--
-- Name: claim_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX claim_types_org_id ON claim_types USING btree (org_id);


--
-- Name: claims_claim_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX claims_claim_type_id ON claims USING btree (claim_type_id);


--
-- Name: claims_employee_adjustment_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX claims_employee_adjustment_id ON claims USING btree (employee_adjustment_id);


--
-- Name: claims_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX claims_entity_id ON claims USING btree (entity_id);


--
-- Name: claims_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX claims_org_id ON claims USING btree (org_id);


--
-- Name: contract_status_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX contract_status_org_id ON contract_status USING btree (org_id);


--
-- Name: contract_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX contract_types_org_id ON contract_types USING btree (org_id);


--
-- Name: contracts_bidder_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX contracts_bidder_id ON contracts USING btree (bidder_id);


--
-- Name: contracts_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX contracts_org_id ON contracts USING btree (org_id);


--
-- Name: currency_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX currency_org_id ON currency USING btree (org_id);


--
-- Name: currency_rates_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX currency_rates_currency_id ON currency_rates USING btree (currency_id);


--
-- Name: currency_rates_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX currency_rates_org_id ON currency_rates USING btree (org_id);


--
-- Name: cv_projects_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX cv_projects_entity_id ON cv_projects USING btree (entity_id);


--
-- Name: cv_projects_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX cv_projects_org_id ON cv_projects USING btree (org_id);


--
-- Name: cv_seminars_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX cv_seminars_entity_id ON cv_seminars USING btree (entity_id);


--
-- Name: cv_seminars_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX cv_seminars_org_id ON cv_seminars USING btree (org_id);


--
-- Name: day_works_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX day_works_entity_id ON day_works USING btree (entity_id);


--
-- Name: day_works_farm_field_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX day_works_farm_field_id ON day_works USING btree (farm_field_id);


--
-- Name: day_works_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX day_works_org_id ON day_works USING btree (org_id);


--
-- Name: day_works_period_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX day_works_period_id ON day_works USING btree (period_id);


--
-- Name: default_accounts_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_accounts_account_id ON default_accounts USING btree (account_id);


--
-- Name: default_accounts_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_accounts_org_id ON default_accounts USING btree (org_id);


--
-- Name: default_accounts_use_key_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_accounts_use_key_id ON default_accounts USING btree (use_key_id);


--
-- Name: default_adjustments_adjustment_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_adjustments_adjustment_id ON default_adjustments USING btree (adjustment_id);


--
-- Name: default_adjustments_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_adjustments_entity_id ON default_adjustments USING btree (entity_id);


--
-- Name: default_adjustments_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_adjustments_org_id ON default_adjustments USING btree (org_id);


--
-- Name: default_banking_bank_branch_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_banking_bank_branch_id ON default_banking USING btree (bank_branch_id);


--
-- Name: default_banking_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_banking_currency_id ON default_banking USING btree (currency_id);


--
-- Name: default_banking_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_banking_entity_id ON default_banking USING btree (entity_id);


--
-- Name: default_banking_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_banking_org_id ON default_banking USING btree (org_id);


--
-- Name: default_tax_types_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_tax_types_entity_id ON default_tax_types USING btree (entity_id);


--
-- Name: default_tax_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_tax_types_org_id ON default_tax_types USING btree (org_id);


--
-- Name: default_tax_types_tax_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX default_tax_types_tax_type_id ON default_tax_types USING btree (tax_type_id);


--
-- Name: define_phases_entity_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX define_phases_entity_type_id ON define_phases USING btree (entity_type_id);


--
-- Name: define_phases_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX define_phases_org_id ON define_phases USING btree (org_id);


--
-- Name: define_phases_project_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX define_phases_project_type_id ON define_phases USING btree (project_type_id);


--
-- Name: define_tasks_define_phase_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX define_tasks_define_phase_id ON define_tasks USING btree (define_phase_id);


--
-- Name: define_tasks_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX define_tasks_org_id ON define_tasks USING btree (org_id);


--
-- Name: department_roles_department_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX department_roles_department_id ON department_roles USING btree (department_id);


--
-- Name: department_roles_jobs_category_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX department_roles_jobs_category_id ON department_roles USING btree (jobs_category_id);


--
-- Name: department_roles_ln_department_role_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX department_roles_ln_department_role_id ON department_roles USING btree (ln_department_role_id);


--
-- Name: department_roles_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX department_roles_org_id ON department_roles USING btree (org_id);


--
-- Name: departments_ln_department_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX departments_ln_department_id ON departments USING btree (ln_department_id);


--
-- Name: departments_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX departments_org_id ON departments USING btree (org_id);


--
-- Name: disability_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX disability_org_id ON disability USING btree (org_id);


--
-- Name: education_class_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX education_class_org_id ON education_class USING btree (org_id);


--
-- Name: education_education_class_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX education_education_class_id ON education USING btree (education_class_id);


--
-- Name: education_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX education_entity_id ON education USING btree (entity_id);


--
-- Name: education_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX education_org_id ON education USING btree (org_id);


--
-- Name: employee_adjustments_adjustment_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_adjustments_adjustment_id ON employee_adjustments USING btree (adjustment_id);


--
-- Name: employee_adjustments_employee_month_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_adjustments_employee_month_id ON employee_adjustments USING btree (employee_month_id);


--
-- Name: employee_adjustments_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_adjustments_org_id ON employee_adjustments USING btree (org_id);


--
-- Name: employee_adjustments_pension_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_adjustments_pension_id ON employee_adjustments USING btree (pension_id);


--
-- Name: employee_advances_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_advances_currency_id ON employee_advances USING btree (currency_id);


--
-- Name: employee_advances_employee_month_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_advances_employee_month_id ON employee_advances USING btree (employee_month_id);


--
-- Name: employee_advances_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_advances_entity_id ON employee_advances USING btree (entity_id);


--
-- Name: employee_advances_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_advances_org_id ON employee_advances USING btree (org_id);


--
-- Name: employee_banking_bank_branch_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_banking_bank_branch_id ON employee_banking USING btree (bank_branch_id);


--
-- Name: employee_banking_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_banking_currency_id ON employee_banking USING btree (currency_id);


--
-- Name: employee_banking_employee_month_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_banking_employee_month_id ON employee_banking USING btree (employee_month_id);


--
-- Name: employee_banking_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_banking_org_id ON employee_banking USING btree (org_id);


--
-- Name: employee_cases_case_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_cases_case_type_id ON employee_cases USING btree (case_type_id);


--
-- Name: employee_cases_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_cases_entity_id ON employee_cases USING btree (entity_id);


--
-- Name: employee_cases_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_cases_org_id ON employee_cases USING btree (org_id);


--
-- Name: employee_leave_contact_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_leave_contact_entity_id ON employee_leave USING btree (contact_entity_id);


--
-- Name: employee_leave_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_leave_entity_id ON employee_leave USING btree (entity_id);


--
-- Name: employee_leave_leave_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_leave_leave_type_id ON employee_leave USING btree (leave_type_id);


--
-- Name: employee_leave_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_leave_org_id ON employee_leave USING btree (org_id);


--
-- Name: employee_leave_types_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_leave_types_entity_id ON employee_leave_types USING btree (entity_id);


--
-- Name: employee_leave_types_leave_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_leave_types_leave_type_id ON employee_leave_types USING btree (leave_type_id);


--
-- Name: employee_leave_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_leave_types_org_id ON employee_leave_types USING btree (org_id);


--
-- Name: employee_month_bank_branch_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_month_bank_branch_id ON employee_month USING btree (bank_branch_id);


--
-- Name: employee_month_bank_pay_group_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_month_bank_pay_group_id ON employee_month USING btree (pay_group_id);


--
-- Name: employee_month_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_month_currency_id ON employee_month USING btree (currency_id);


--
-- Name: employee_month_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_month_entity_id ON employee_month USING btree (entity_id);


--
-- Name: employee_month_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_month_org_id ON employee_month USING btree (org_id);


--
-- Name: employee_month_period_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_month_period_id ON employee_month USING btree (period_id);


--
-- Name: employee_objectives_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_objectives_entity_id ON employee_objectives USING btree (entity_id);


--
-- Name: employee_objectives_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_objectives_org_id ON employee_objectives USING btree (org_id);


--
-- Name: employee_overtime_employee_month_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_overtime_employee_month_id ON employee_overtime USING btree (employee_month_id);


--
-- Name: employee_overtime_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_overtime_org_id ON employee_overtime USING btree (org_id);


--
-- Name: employee_per_diem_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_per_diem_currency_id ON employee_per_diem USING btree (currency_id);


--
-- Name: employee_per_diem_employee_month_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_per_diem_employee_month_id ON employee_per_diem USING btree (employee_month_id);


--
-- Name: employee_per_diem_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_per_diem_org_id ON employee_per_diem USING btree (org_id);


--
-- Name: employee_tax_types_employee_month_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_tax_types_employee_month_id ON employee_tax_types USING btree (employee_month_id);


--
-- Name: employee_tax_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_tax_types_org_id ON employee_tax_types USING btree (org_id);


--
-- Name: employee_tax_types_tax_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_tax_types_tax_type_id ON employee_tax_types USING btree (tax_type_id);


--
-- Name: employee_trainings_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_trainings_entity_id ON employee_trainings USING btree (entity_id);


--
-- Name: employee_trainings_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_trainings_org_id ON employee_trainings USING btree (org_id);


--
-- Name: employee_trainings_training_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employee_trainings_training_id ON employee_trainings USING btree (training_id);


--
-- Name: employees_bank_branch_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_bank_branch_id ON employees USING btree (bank_branch_id);


--
-- Name: employees_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_currency_id ON employees USING btree (currency_id);


--
-- Name: employees_department_role_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_department_role_id ON employees USING btree (department_role_id);


--
-- Name: employees_disability_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_disability_id ON employees USING btree (disability_id);


--
-- Name: employees_location_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_location_id ON employees USING btree (location_id);


--
-- Name: employees_nation_of_birth; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_nation_of_birth ON employees USING btree (nation_of_birth);


--
-- Name: employees_nationality; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_nationality ON employees USING btree (nationality);


--
-- Name: employees_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_org_id ON employees USING btree (org_id);


--
-- Name: employees_pay_group_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_pay_group_id ON employees USING btree (pay_group_id);


--
-- Name: employees_pay_scale_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_pay_scale_id ON employees USING btree (pay_scale_id);


--
-- Name: employees_pay_scale_step_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employees_pay_scale_step_id ON employees USING btree (pay_scale_step_id);


--
-- Name: employment_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employment_entity_id ON employment USING btree (entity_id);


--
-- Name: employment_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX employment_org_id ON employment USING btree (org_id);


--
-- Name: entity_subscriptions_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entity_subscriptions_entity_id ON entity_subscriptions USING btree (entity_id);


--
-- Name: entity_subscriptions_entity_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entity_subscriptions_entity_type_id ON entity_subscriptions USING btree (entity_type_id);


--
-- Name: entity_subscriptions_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entity_subscriptions_org_id ON entity_subscriptions USING btree (org_id);


--
-- Name: entity_subscriptions_subscription_level_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entity_subscriptions_subscription_level_id ON entity_subscriptions USING btree (subscription_level_id);


--
-- Name: entity_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entity_types_org_id ON entity_types USING btree (org_id);


--
-- Name: entity_types_use_key_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entity_types_use_key_id ON entity_types USING btree (use_key_id);


--
-- Name: entitys_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entitys_account_id ON entitys USING btree (account_id);


--
-- Name: entitys_entity_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entitys_entity_type_id ON entitys USING btree (entity_type_id);


--
-- Name: entitys_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entitys_org_id ON entitys USING btree (org_id);


--
-- Name: entitys_use_key_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entitys_use_key_id ON entitys USING btree (use_key_id);


--
-- Name: entitys_user_name; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entitys_user_name ON entitys USING btree (user_name);


--
-- Name: entry_forms_entered_by_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entry_forms_entered_by_id ON entry_forms USING btree (entered_by_id);


--
-- Name: entry_forms_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entry_forms_entity_id ON entry_forms USING btree (entity_id);


--
-- Name: entry_forms_form_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entry_forms_form_id ON entry_forms USING btree (form_id);


--
-- Name: entry_forms_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX entry_forms_org_id ON entry_forms USING btree (org_id);


--
-- Name: evaluation_points_career_development_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX evaluation_points_career_development_id ON evaluation_points USING btree (career_development_id);


--
-- Name: evaluation_points_job_review_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX evaluation_points_job_review_id ON evaluation_points USING btree (job_review_id);


--
-- Name: evaluation_points_objective_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX evaluation_points_objective_id ON evaluation_points USING btree (objective_id);


--
-- Name: evaluation_points_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX evaluation_points_org_id ON evaluation_points USING btree (org_id);


--
-- Name: evaluation_points_review_point_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX evaluation_points_review_point_id ON evaluation_points USING btree (review_point_id);


--
-- Name: farm_fields_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX farm_fields_org_id ON farm_fields USING btree (org_id);


--
-- Name: fields_form_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX fields_form_id ON fields USING btree (form_id);


--
-- Name: fields_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX fields_org_id ON fields USING btree (org_id);


--
-- Name: fiscal_years_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX fiscal_years_org_id ON fiscal_years USING btree (org_id);


--
-- Name: follow_up_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX follow_up_entity_id ON follow_up USING btree (entity_id);


--
-- Name: follow_up_lead_item_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX follow_up_lead_item_id ON follow_up USING btree (lead_item_id);


--
-- Name: follow_up_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX follow_up_org_id ON follow_up USING btree (org_id);


--
-- Name: forms_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX forms_org_id ON forms USING btree (org_id);


--
-- Name: gls_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX gls_account_id ON gls USING btree (account_id);


--
-- Name: gls_journal_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX gls_journal_id ON gls USING btree (journal_id);


--
-- Name: gls_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX gls_org_id ON gls USING btree (org_id);


--
-- Name: helpdesk_client_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX helpdesk_client_id ON helpdesk USING btree (client_id);


--
-- Name: helpdesk_closed_by; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX helpdesk_closed_by ON helpdesk USING btree (closed_by);


--
-- Name: helpdesk_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX helpdesk_org_id ON helpdesk USING btree (org_id);


--
-- Name: helpdesk_pdefinition_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX helpdesk_pdefinition_id ON helpdesk USING btree (pdefinition_id);


--
-- Name: helpdesk_plevel_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX helpdesk_plevel_id ON helpdesk USING btree (plevel_id);


--
-- Name: helpdesk_recorded_by; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX helpdesk_recorded_by ON helpdesk USING btree (recorded_by);


--
-- Name: holidays_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX holidays_org_id ON holidays USING btree (org_id);


--
-- Name: identification_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX identification_types_org_id ON identification_types USING btree (org_id);


--
-- Name: identifications_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX identifications_entity_id ON identifications USING btree (entity_id);


--
-- Name: identifications_identification_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX identifications_identification_type_id ON identifications USING btree (identification_type_id);


--
-- Name: identifications_nationality; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX identifications_nationality ON identifications USING btree (nationality);


--
-- Name: identifications_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX identifications_org_id ON identifications USING btree (org_id);


--
-- Name: industry_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX industry_org_id ON industry USING btree (org_id);


--
-- Name: intake_department_role_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX intake_department_role_id ON intake USING btree (department_role_id);


--
-- Name: intake_location_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX intake_location_id ON intake USING btree (location_id);


--
-- Name: intake_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX intake_org_id ON intake USING btree (org_id);


--
-- Name: intake_pay_group_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX intake_pay_group_id ON intake USING btree (pay_group_id);


--
-- Name: intake_pay_scale_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX intake_pay_scale_id ON intake USING btree (pay_scale_id);


--
-- Name: interns_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX interns_entity_id ON interns USING btree (entity_id);


--
-- Name: interns_internship_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX interns_internship_id ON interns USING btree (internship_id);


--
-- Name: interns_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX interns_org_id ON interns USING btree (org_id);


--
-- Name: internships_department_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX internships_department_id ON internships USING btree (department_id);


--
-- Name: internships_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX internships_org_id ON internships USING btree (org_id);


--
-- Name: item_category_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX item_category_org_id ON item_category USING btree (org_id);


--
-- Name: item_units_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX item_units_org_id ON item_units USING btree (org_id);


--
-- Name: items_item_category_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX items_item_category_id ON items USING btree (item_category_id);


--
-- Name: items_item_unit_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX items_item_unit_id ON items USING btree (item_unit_id);


--
-- Name: items_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX items_org_id ON items USING btree (org_id);


--
-- Name: items_purchase_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX items_purchase_account_id ON items USING btree (purchase_account_id);


--
-- Name: items_sales_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX items_sales_account_id ON items USING btree (sales_account_id);


--
-- Name: items_tax_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX items_tax_type_id ON items USING btree (tax_type_id);


--
-- Name: job_reviews_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX job_reviews_entity_id ON job_reviews USING btree (entity_id);


--
-- Name: job_reviews_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX job_reviews_org_id ON job_reviews USING btree (org_id);


--
-- Name: job_reviews_review_category_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX job_reviews_review_category_id ON job_reviews USING btree (review_category_id);


--
-- Name: jobs_category_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX jobs_category_org_id ON jobs_category USING btree (org_id);


--
-- Name: journals_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX journals_currency_id ON journals USING btree (currency_id);


--
-- Name: journals_department_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX journals_department_id ON journals USING btree (department_id);


--
-- Name: journals_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX journals_org_id ON journals USING btree (org_id);


--
-- Name: journals_period_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX journals_period_id ON journals USING btree (period_id);


--
-- Name: kin_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX kin_types_org_id ON kin_types USING btree (org_id);


--
-- Name: kins_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX kins_entity_id ON kins USING btree (entity_id);


--
-- Name: kins_kin_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX kins_kin_type_id ON kins USING btree (kin_type_id);


--
-- Name: kins_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX kins_org_id ON kins USING btree (org_id);


--
-- Name: lead_items_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX lead_items_entity_id ON lead_items USING btree (entity_id);


--
-- Name: lead_items_item_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX lead_items_item_id ON lead_items USING btree (item_id);


--
-- Name: lead_items_lead_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX lead_items_lead_id ON lead_items USING btree (lead_id);


--
-- Name: lead_items_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX lead_items_org_id ON lead_items USING btree (org_id);


--
-- Name: leads_country_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX leads_country_id ON leads USING btree (country_id);


--
-- Name: leads_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX leads_entity_id ON leads USING btree (entity_id);


--
-- Name: leads_industry_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX leads_industry_id ON leads USING btree (industry_id);


--
-- Name: leads_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX leads_org_id ON leads USING btree (org_id);


--
-- Name: leave_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX leave_types_org_id ON leave_types USING btree (org_id);


--
-- Name: leave_work_days_employee_leave_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX leave_work_days_employee_leave_id ON leave_work_days USING btree (employee_leave_id);


--
-- Name: leave_work_days_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX leave_work_days_org_id ON leave_work_days USING btree (org_id);


--
-- Name: ledger_links_ledger_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX ledger_links_ledger_type_id ON ledger_links USING btree (ledger_type_id);


--
-- Name: ledger_links_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX ledger_links_org_id ON ledger_links USING btree (org_id);


--
-- Name: ledger_types_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX ledger_types_account_id ON ledger_types USING btree (account_id);


--
-- Name: ledger_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX ledger_types_org_id ON ledger_types USING btree (org_id);


--
-- Name: ledger_types_tax_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX ledger_types_tax_account_id ON ledger_types USING btree (tax_account_id);


--
-- Name: loan_monthly_loan_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX loan_monthly_loan_id ON loan_monthly USING btree (loan_id);


--
-- Name: loan_monthly_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX loan_monthly_org_id ON loan_monthly USING btree (org_id);


--
-- Name: loan_monthly_period_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX loan_monthly_period_id ON loan_monthly USING btree (period_id);


--
-- Name: loan_types_adjustment_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX loan_types_adjustment_id ON loan_types USING btree (adjustment_id);


--
-- Name: loan_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX loan_types_org_id ON loan_types USING btree (org_id);


--
-- Name: loans_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX loans_entity_id ON loans USING btree (entity_id);


--
-- Name: loans_loan_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX loans_loan_type_id ON loans USING btree (loan_type_id);


--
-- Name: loans_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX loans_org_id ON loans USING btree (org_id);


--
-- Name: locations_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX locations_org_id ON locations USING btree (org_id);


--
-- Name: objective_details_ln_objective_detail_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX objective_details_ln_objective_detail_id ON objective_details USING btree (ln_objective_detail_id);


--
-- Name: objective_details_objective_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX objective_details_objective_id ON objective_details USING btree (objective_id);


--
-- Name: objective_details_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX objective_details_org_id ON objective_details USING btree (org_id);


--
-- Name: objective_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX objective_types_org_id ON objective_types USING btree (org_id);


--
-- Name: objectives_employee_objective_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX objectives_employee_objective_id ON objectives USING btree (employee_objective_id);


--
-- Name: objectives_objective_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX objectives_objective_type_id ON objectives USING btree (objective_type_id);


--
-- Name: objectives_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX objectives_org_id ON objectives USING btree (org_id);


--
-- Name: org_events_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX org_events_id ON org_events USING btree (org_id);


--
-- Name: orgs_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX orgs_currency_id ON orgs USING btree (currency_id);


--
-- Name: orgs_default_country_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX orgs_default_country_id ON orgs USING btree (default_country_id);


--
-- Name: orgs_parent_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX orgs_parent_org_id ON orgs USING btree (parent_org_id);


--
-- Name: pay_groups_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pay_groups_org_id ON pay_groups USING btree (org_id);


--
-- Name: pay_scale_steps_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pay_scale_steps_org_id ON pay_scale_steps USING btree (org_id);


--
-- Name: pay_scale_steps_pay_scale_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pay_scale_steps_pay_scale_id ON pay_scale_steps USING btree (pay_scale_id);


--
-- Name: pay_scale_years_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pay_scale_years_org_id ON pay_scale_years USING btree (org_id);


--
-- Name: pay_scale_years_pay_scale_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pay_scale_years_pay_scale_id ON pay_scale_years USING btree (pay_scale_id);


--
-- Name: pay_scales_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pay_scales_currency_id ON pay_scales USING btree (currency_id);


--
-- Name: pay_scales_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pay_scales_org_id ON pay_scales USING btree (org_id);


--
-- Name: pc_allocations_department_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_allocations_department_id ON pc_allocations USING btree (department_id);


--
-- Name: pc_allocations_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_allocations_entity_id ON pc_allocations USING btree (entity_id);


--
-- Name: pc_allocations_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_allocations_org_id ON pc_allocations USING btree (org_id);


--
-- Name: pc_allocations_period_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_allocations_period_id ON pc_allocations USING btree (period_id);


--
-- Name: pc_banking_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_banking_org_id ON pc_banking USING btree (org_id);


--
-- Name: pc_banking_pc_allocation_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_banking_pc_allocation_id ON pc_banking USING btree (pc_allocation_id);


--
-- Name: pc_budget_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_budget_org_id ON pc_budget USING btree (org_id);


--
-- Name: pc_budget_pc_allocation_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_budget_pc_allocation_id ON pc_budget USING btree (pc_allocation_id);


--
-- Name: pc_budget_pc_item_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_budget_pc_item_id ON pc_budget USING btree (pc_item_id);


--
-- Name: pc_category_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_category_org_id ON pc_category USING btree (org_id);


--
-- Name: pc_expenditure_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_expenditure_org_id ON pc_expenditure USING btree (org_id);


--
-- Name: pc_expenditure_pc_allocation_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_expenditure_pc_allocation_id ON pc_expenditure USING btree (pc_allocation_id);


--
-- Name: pc_expenditure_pc_item_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_expenditure_pc_item_id ON pc_expenditure USING btree (pc_item_id);


--
-- Name: pc_items_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_items_org_id ON pc_items USING btree (org_id);


--
-- Name: pc_items_pc_category_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_items_pc_category_id ON pc_items USING btree (pc_category_id);


--
-- Name: pc_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pc_types_org_id ON pc_types USING btree (org_id);


--
-- Name: pdefinitions_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pdefinitions_org_id ON pdefinitions USING btree (org_id);


--
-- Name: pdefinitions_ptype_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pdefinitions_ptype_id ON pdefinitions USING btree (ptype_id);


--
-- Name: pension_adjustment_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pension_adjustment_id ON pensions USING btree (adjustment_id);


--
-- Name: pension_contribution_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pension_contribution_id ON pensions USING btree (contribution_id);


--
-- Name: pension_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pension_entity_id ON pensions USING btree (entity_id);


--
-- Name: pension_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX pension_org_id ON pensions USING btree (org_id);


--
-- Name: period_tax_rates_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX period_tax_rates_org_id ON period_tax_rates USING btree (org_id);


--
-- Name: period_tax_rates_period_tax_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX period_tax_rates_period_tax_type_id ON period_tax_rates USING btree (period_tax_type_id);


--
-- Name: period_tax_types_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX period_tax_types_account_id ON period_tax_types USING btree (account_id);


--
-- Name: period_tax_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX period_tax_types_org_id ON period_tax_types USING btree (org_id);


--
-- Name: period_tax_types_period_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX period_tax_types_period_id ON period_tax_types USING btree (period_id);


--
-- Name: period_tax_types_tax_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX period_tax_types_tax_type_id ON period_tax_types USING btree (tax_type_id);


--
-- Name: periods_fiscal_year_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX periods_fiscal_year_id ON periods USING btree (fiscal_year_id);


--
-- Name: periods_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX periods_org_id ON periods USING btree (org_id);


--
-- Name: phases_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX phases_org_id ON phases USING btree (org_id);


--
-- Name: phases_project_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX phases_project_id ON phases USING btree (project_id);


--
-- Name: plevels_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX plevels_org_id ON plevels USING btree (org_id);


--
-- Name: product_receipts_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX product_receipts_org_id ON product_receipts USING btree (org_id);


--
-- Name: product_receipts_receipt_source_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX product_receipts_receipt_source_id ON product_receipts USING btree (receipt_source_id);


--
-- Name: productions_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX productions_entity_id ON productions USING btree (entity_id);


--
-- Name: productions_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX productions_org_id ON productions USING btree (org_id);


--
-- Name: productions_product_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX productions_product_id ON productions USING btree (product_id);


--
-- Name: products_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX products_org_id ON products USING btree (org_id);


--
-- Name: project_cost_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_cost_org_id ON project_cost USING btree (org_id);


--
-- Name: project_cost_phase_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_cost_phase_id ON project_cost USING btree (phase_id);


--
-- Name: project_staff_costs_employee_month_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_staff_costs_employee_month_id ON project_staff_costs USING btree (employee_month_id);


--
-- Name: project_staff_costs_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_staff_costs_org_id ON project_staff_costs USING btree (org_id);


--
-- Name: project_staff_costs_project_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_staff_costs_project_id ON project_staff_costs USING btree (project_id);


--
-- Name: project_staff_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_staff_entity_id ON project_staff USING btree (entity_id);


--
-- Name: project_staff_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_staff_org_id ON project_staff USING btree (org_id);


--
-- Name: project_staff_project_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_staff_project_id ON project_staff USING btree (project_id);


--
-- Name: project_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_types_org_id ON project_types USING btree (org_id);


--
-- Name: projects_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX projects_entity_id ON projects USING btree (entity_id);


--
-- Name: projects_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX projects_org_id ON projects USING btree (org_id);


--
-- Name: projects_project_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX projects_project_type_id ON projects USING btree (project_type_id);


--
-- Name: ptypes_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX ptypes_org_id ON ptypes USING btree (org_id);


--
-- Name: quotations_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX quotations_entity_id ON quotations USING btree (entity_id);


--
-- Name: quotations_item_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX quotations_item_id ON quotations USING btree (item_id);


--
-- Name: quotations_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX quotations_org_id ON quotations USING btree (org_id);


--
-- Name: receipt_sources_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX receipt_sources_org_id ON receipt_sources USING btree (org_id);


--
-- Name: reporting_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX reporting_entity_id ON reporting USING btree (entity_id);


--
-- Name: reporting_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX reporting_org_id ON reporting USING btree (org_id);


--
-- Name: reporting_report_to_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX reporting_report_to_id ON reporting USING btree (report_to_id);


--
-- Name: review_category_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX review_category_org_id ON review_category USING btree (org_id);


--
-- Name: review_points_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX review_points_org_id ON review_points USING btree (org_id);


--
-- Name: review_points_review_category_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX review_points_review_category_id ON review_points USING btree (review_category_id);


--
-- Name: shift_schedule_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX shift_schedule_entity_id ON shift_schedule USING btree (entity_id);


--
-- Name: shift_schedule_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX shift_schedule_org_id ON shift_schedule USING btree (org_id);


--
-- Name: shift_schedule_shift_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX shift_schedule_shift_id ON shift_schedule USING btree (shift_id);


--
-- Name: shifts_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX shifts_org_id ON shifts USING btree (org_id);


--
-- Name: shifts_project_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX shifts_project_id ON shifts USING btree (project_id);


--
-- Name: skill_category_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX skill_category_org_id ON skill_category USING btree (org_id);


--
-- Name: skill_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX skill_types_org_id ON skill_types USING btree (org_id);


--
-- Name: skill_types_skill_category_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX skill_types_skill_category_id ON skill_types USING btree (skill_category_id);


--
-- Name: skills_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX skills_entity_id ON skills USING btree (entity_id);


--
-- Name: skills_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX skills_org_id ON skills USING btree (org_id);


--
-- Name: skills_skill_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX skills_skill_type_id ON skills USING btree (skill_type_id);


--
-- Name: stock_lines_item_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX stock_lines_item_id ON stock_lines USING btree (item_id);


--
-- Name: stock_lines_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX stock_lines_org_id ON stock_lines USING btree (org_id);


--
-- Name: stock_lines_stock_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX stock_lines_stock_id ON stock_lines USING btree (stock_id);


--
-- Name: stocks_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX stocks_org_id ON stocks USING btree (org_id);


--
-- Name: stocks_store_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX stocks_store_id ON stocks USING btree (store_id);


--
-- Name: stores_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX stores_org_id ON stores USING btree (org_id);


--
-- Name: sub_fields_field_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sub_fields_field_id ON sub_fields USING btree (field_id);


--
-- Name: sub_fields_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sub_fields_org_id ON sub_fields USING btree (org_id);


--
-- Name: subscription_levels_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX subscription_levels_org_id ON subscription_levels USING btree (org_id);


--
-- Name: subscriptions_account_manager_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX subscriptions_account_manager_id ON subscriptions USING btree (account_manager_id);


--
-- Name: subscriptions_country_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX subscriptions_country_id ON subscriptions USING btree (country_id);


--
-- Name: subscriptions_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX subscriptions_entity_id ON subscriptions USING btree (entity_id);


--
-- Name: subscriptions_industry_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX subscriptions_industry_id ON subscriptions USING btree (industry_id);


--
-- Name: subscriptions_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX subscriptions_org_id ON subscriptions USING btree (org_id);


--
-- Name: sys_countrys_sys_continent_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_countrys_sys_continent_id ON sys_countrys USING btree (sys_continent_id);


--
-- Name: sys_dashboard_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_dashboard_entity_id ON sys_dashboard USING btree (entity_id);


--
-- Name: sys_dashboard_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_dashboard_org_id ON sys_dashboard USING btree (org_id);


--
-- Name: sys_emailed_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_emailed_org_id ON sys_emailed USING btree (org_id);


--
-- Name: sys_emailed_sys_email_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_emailed_sys_email_id ON sys_emailed USING btree (sys_email_id);


--
-- Name: sys_emailed_table_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_emailed_table_id ON sys_emailed USING btree (table_id);


--
-- Name: sys_emails_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_emails_org_id ON sys_emails USING btree (org_id);


--
-- Name: sys_files_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_files_org_id ON sys_files USING btree (org_id);


--
-- Name: sys_files_table_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_files_table_id ON sys_files USING btree (table_id);


--
-- Name: sys_logins_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_logins_entity_id ON sys_logins USING btree (entity_id);


--
-- Name: sys_news_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_news_org_id ON sys_news USING btree (org_id);


--
-- Name: sys_queries_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_queries_org_id ON sys_queries USING btree (org_id);


--
-- Name: sys_reset_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_reset_entity_id ON sys_reset USING btree (entity_id);


--
-- Name: sys_reset_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX sys_reset_org_id ON sys_reset USING btree (org_id);


--
-- Name: tasks_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tasks_entity_id ON tasks USING btree (entity_id);


--
-- Name: tasks_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tasks_org_id ON tasks USING btree (org_id);


--
-- Name: tasks_phase_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tasks_phase_id ON tasks USING btree (phase_id);


--
-- Name: tax_rates_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tax_rates_org_id ON tax_rates USING btree (org_id);


--
-- Name: tax_rates_tax_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tax_rates_tax_type_id ON tax_rates USING btree (tax_type_id);


--
-- Name: tax_types_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tax_types_account_id ON tax_types USING btree (account_id);


--
-- Name: tax_types_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tax_types_currency_id ON tax_types USING btree (currency_id);


--
-- Name: tax_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tax_types_org_id ON tax_types USING btree (org_id);


--
-- Name: tax_types_sys_country_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tax_types_sys_country_id ON tax_types USING btree (sys_country_id);


--
-- Name: tax_types_use_key_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tax_types_use_key_id ON tax_types USING btree (use_key_id);


--
-- Name: tender_items_bidder_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tender_items_bidder_id ON tender_items USING btree (bidder_id);


--
-- Name: tender_items_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tender_items_org_id ON tender_items USING btree (org_id);


--
-- Name: tender_types_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tender_types_org_id ON tender_types USING btree (org_id);


--
-- Name: tenders_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tenders_org_id ON tenders USING btree (org_id);


--
-- Name: tenders_tender_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX tenders_tender_type_id ON tenders USING btree (tender_type_id);


--
-- Name: timesheet_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX timesheet_org_id ON timesheet USING btree (org_id);


--
-- Name: timesheet_task_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX timesheet_task_id ON timesheet USING btree (task_id);


--
-- Name: trainings_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX trainings_org_id ON trainings USING btree (org_id);


--
-- Name: transaction_counters_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_counters_org_id ON transaction_counters USING btree (org_id);


--
-- Name: transaction_counters_transaction_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_counters_transaction_type_id ON transaction_counters USING btree (transaction_type_id);


--
-- Name: transaction_details_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_details_account_id ON transaction_details USING btree (account_id);


--
-- Name: transaction_details_item_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_details_item_id ON transaction_details USING btree (item_id);


--
-- Name: transaction_details_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_details_org_id ON transaction_details USING btree (org_id);


--
-- Name: transaction_details_transaction_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_details_transaction_id ON transaction_details USING btree (transaction_id);


--
-- Name: transaction_links_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_links_org_id ON transaction_links USING btree (org_id);


--
-- Name: transaction_links_transaction_detail_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_links_transaction_detail_id ON transaction_links USING btree (transaction_detail_id);


--
-- Name: transaction_links_transaction_detail_to; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_links_transaction_detail_to ON transaction_links USING btree (transaction_detail_to);


--
-- Name: transaction_links_transaction_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_links_transaction_id ON transaction_links USING btree (transaction_id);


--
-- Name: transaction_links_transaction_to; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transaction_links_transaction_to ON transaction_links USING btree (transaction_to);


--
-- Name: transactions_bank_account_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transactions_bank_account_id ON transactions USING btree (bank_account_id);


--
-- Name: transactions_currency_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transactions_currency_id ON transactions USING btree (currency_id);


--
-- Name: transactions_department_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transactions_department_id ON transactions USING btree (department_id);


--
-- Name: transactions_entered_by; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transactions_entered_by ON transactions USING btree (entered_by);


--
-- Name: transactions_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transactions_entity_id ON transactions USING btree (entity_id);


--
-- Name: transactions_journal_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transactions_journal_id ON transactions USING btree (journal_id);


--
-- Name: transactions_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transactions_org_id ON transactions USING btree (org_id);


--
-- Name: transactions_transaction_status_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transactions_transaction_status_id ON transactions USING btree (transaction_status_id);


--
-- Name: transactions_transaction_type_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transactions_transaction_type_id ON transactions USING btree (transaction_type_id);


--
-- Name: transactions_workflow_table_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX transactions_workflow_table_id ON transactions USING btree (workflow_table_id);


--
-- Name: work_rate_changes_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX work_rate_changes_org_id ON work_rate_changes USING btree (org_id);


--
-- Name: work_rate_changes_work_rate_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX work_rate_changes_work_rate_id ON work_rate_changes USING btree (work_rate_id);


--
-- Name: work_rates_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX work_rates_org_id ON work_rates USING btree (org_id);


--
-- Name: workflow_logs_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX workflow_logs_org_id ON workflow_logs USING btree (org_id);


--
-- Name: workflow_phases_approval_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX workflow_phases_approval_entity_id ON workflow_phases USING btree (approval_entity_id);


--
-- Name: workflow_phases_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX workflow_phases_org_id ON workflow_phases USING btree (org_id);


--
-- Name: workflow_phases_workflow_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX workflow_phases_workflow_id ON workflow_phases USING btree (workflow_id);


--
-- Name: workflow_sql_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX workflow_sql_org_id ON workflow_sql USING btree (org_id);


--
-- Name: workflow_sql_workflow_phase_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX workflow_sql_workflow_phase_id ON workflow_sql USING btree (workflow_phase_id);


--
-- Name: workflows_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX workflows_org_id ON workflows USING btree (org_id);


--
-- Name: workflows_source_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX workflows_source_entity_id ON workflows USING btree (source_entity_id);


--
-- Name: works_day_work_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX works_day_work_id ON works USING btree (day_work_id);


--
-- Name: works_entity_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX works_entity_id ON works USING btree (entity_id);


--
-- Name: works_org_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX works_org_id ON works USING btree (org_id);


--
-- Name: works_work_rate_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX works_work_rate_id ON works USING btree (work_rate_id);


--
-- Name: af_upd_transaction_details; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER af_upd_transaction_details AFTER INSERT OR DELETE OR UPDATE ON transaction_details FOR EACH ROW EXECUTE PROCEDURE af_upd_transaction_details();


--
-- Name: ins_address; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_address BEFORE INSERT OR UPDATE ON address FOR EACH ROW EXECUTE PROCEDURE ins_address();


--
-- Name: ins_applicants; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_applicants BEFORE INSERT OR UPDATE ON applicants FOR EACH ROW EXECUTE PROCEDURE ins_applicants();


--
-- Name: ins_applications; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_applications BEFORE INSERT ON applications FOR EACH ROW EXECUTE PROCEDURE ins_applications();


--
-- Name: ins_approvals; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_approvals BEFORE INSERT ON approvals FOR EACH ROW EXECUTE PROCEDURE ins_approvals();


--
-- Name: ins_asset_valuations; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_asset_valuations BEFORE INSERT OR UPDATE ON asset_valuations FOR EACH ROW EXECUTE PROCEDURE ins_asset_valuations();


--
-- Name: ins_employee_adjustments; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_employee_adjustments BEFORE INSERT OR UPDATE ON employee_adjustments FOR EACH ROW EXECUTE PROCEDURE ins_employee_adjustments();


--
-- Name: ins_employee_advances; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_employee_advances BEFORE INSERT OR UPDATE ON employee_advances FOR EACH ROW EXECUTE PROCEDURE ins_employee_advances();


--
-- Name: ins_employee_leave; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_employee_leave BEFORE INSERT OR UPDATE ON employee_leave FOR EACH ROW EXECUTE PROCEDURE ins_employee_leave();


--
-- Name: ins_employee_leave_types; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_employee_leave_types BEFORE INSERT ON employee_leave_types FOR EACH ROW EXECUTE PROCEDURE ins_employee_leave_types();


--
-- Name: ins_employee_limit; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_employee_limit BEFORE INSERT ON employees FOR EACH ROW EXECUTE PROCEDURE ins_employee_limit();


--
-- Name: ins_employee_month; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_employee_month BEFORE INSERT ON employee_month FOR EACH ROW EXECUTE PROCEDURE ins_employee_month();


--
-- Name: ins_employees; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_employees BEFORE INSERT OR UPDATE ON employees FOR EACH ROW EXECUTE PROCEDURE ins_employees();


--
-- Name: ins_entitys; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_entitys AFTER INSERT ON entitys FOR EACH ROW EXECUTE PROCEDURE ins_entitys();


--
-- Name: ins_entry_forms; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_entry_forms BEFORE INSERT ON entry_forms FOR EACH ROW EXECUTE PROCEDURE ins_entry_forms();


--
-- Name: ins_fields; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_fields BEFORE INSERT ON fields FOR EACH ROW EXECUTE PROCEDURE ins_fields();


--
-- Name: ins_job_reviews; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_job_reviews AFTER INSERT ON job_reviews FOR EACH ROW EXECUTE PROCEDURE ins_job_reviews();


--
-- Name: ins_leave_work_days; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_leave_work_days BEFORE INSERT ON leave_work_days FOR EACH ROW EXECUTE PROCEDURE ins_leave_work_days();


--
-- Name: ins_loans; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_loans BEFORE INSERT OR UPDATE ON loans FOR EACH ROW EXECUTE PROCEDURE ins_loans();


--
-- Name: ins_objective_details; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_objective_details BEFORE INSERT OR UPDATE ON objective_details FOR EACH ROW EXECUTE PROCEDURE ins_objective_details();


--
-- Name: ins_objectives; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_objectives AFTER INSERT OR UPDATE ON objectives FOR EACH ROW EXECUTE PROCEDURE ins_objectives();


--
-- Name: ins_password; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_password BEFORE INSERT OR UPDATE ON entitys FOR EACH ROW EXECUTE PROCEDURE ins_password();


--
-- Name: ins_period_tax_types; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_period_tax_types AFTER INSERT ON period_tax_types FOR EACH ROW EXECUTE PROCEDURE ins_period_tax_types();


--
-- Name: ins_periods; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_periods BEFORE INSERT OR UPDATE ON periods FOR EACH ROW EXECUTE PROCEDURE ins_periods();


--
-- Name: ins_productions; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_productions BEFORE INSERT ON productions FOR EACH ROW EXECUTE PROCEDURE ins_productions();


--
-- Name: ins_projects; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_projects AFTER INSERT ON projects FOR EACH ROW EXECUTE PROCEDURE ins_projects();


--
-- Name: ins_sub_fields; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_sub_fields BEFORE INSERT ON sub_fields FOR EACH ROW EXECUTE PROCEDURE ins_sub_fields();


--
-- Name: ins_subscriptions; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_subscriptions BEFORE INSERT OR UPDATE ON subscriptions FOR EACH ROW EXECUTE PROCEDURE ins_subscriptions();


--
-- Name: ins_sys_reset; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_sys_reset AFTER INSERT ON sys_reset FOR EACH ROW EXECUTE PROCEDURE ins_sys_reset();


--
-- Name: ins_taxes; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_taxes AFTER INSERT ON employees FOR EACH ROW EXECUTE PROCEDURE ins_taxes();


--
-- Name: ins_transactions; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_transactions BEFORE INSERT OR UPDATE ON transactions FOR EACH ROW EXECUTE PROCEDURE ins_transactions();


--
-- Name: ins_transactions_limit; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_transactions_limit BEFORE INSERT ON transactions FOR EACH ROW EXECUTE PROCEDURE ins_transactions_limit();


--
-- Name: ins_works; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER ins_works BEFORE INSERT ON works FOR EACH ROW EXECUTE PROCEDURE ins_works();


--
-- Name: insa_employee_objectives; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER insa_employee_objectives AFTER INSERT ON employee_objectives FOR EACH ROW EXECUTE PROCEDURE insa_employee_objectives();


--
-- Name: insf_leave_types; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER insf_leave_types AFTER INSERT ON leave_types FOR EACH ROW EXECUTE PROCEDURE insf_leave_types();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON entry_forms FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON periods FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON employee_leave FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON leave_work_days FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE UPDATE ON applications FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON casual_application FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON casuals FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON interns FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON employee_objectives FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON job_reviews FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON employee_overtime FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON employee_per_diem FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON claims FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON employee_advances FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON loans FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON transactions FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON budgets FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON pc_allocations FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON pc_expenditure FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_action; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_action BEFORE INSERT OR UPDATE ON subscriptions FOR EACH ROW EXECUTE PROCEDURE upd_action();


--
-- Name: upd_approvals; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_approvals AFTER INSERT OR UPDATE ON approvals FOR EACH ROW EXECUTE PROCEDURE upd_approvals();


--
-- Name: upd_budget_lines; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_budget_lines BEFORE INSERT OR UPDATE ON budget_lines FOR EACH ROW EXECUTE PROCEDURE upd_budget_lines();


--
-- Name: upd_employee_adjustments; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_employee_adjustments AFTER INSERT OR UPDATE ON employee_adjustments FOR EACH ROW EXECUTE PROCEDURE upd_employee_adjustments();


--
-- Name: upd_employee_month; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_employee_month AFTER INSERT ON employee_month FOR EACH ROW EXECUTE PROCEDURE upd_employee_month();


--
-- Name: upd_employee_per_diem; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_employee_per_diem BEFORE INSERT OR UPDATE ON employee_per_diem FOR EACH ROW EXECUTE PROCEDURE upd_employee_per_diem();


--
-- Name: upd_gls; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_gls BEFORE INSERT OR UPDATE ON gls FOR EACH ROW EXECUTE PROCEDURE upd_gls();


--
-- Name: upd_objective_details; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_objective_details AFTER INSERT OR UPDATE ON objective_details FOR EACH ROW EXECUTE PROCEDURE upd_objective_details();


--
-- Name: upd_transaction_details; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_transaction_details BEFORE INSERT OR UPDATE ON transaction_details FOR EACH ROW EXECUTE PROCEDURE upd_transaction_details();


--
-- Name: upd_work_rates; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER upd_work_rates AFTER UPDATE ON work_rates FOR EACH ROW EXECUTE PROCEDURE upd_work_rates();


--
-- Name: access_logs_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY access_logs
    ADD CONSTRAINT access_logs_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: access_logs_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY access_logs
    ADD CONSTRAINT access_logs_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: account_class_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY account_class
    ADD CONSTRAINT account_class_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: account_types_account_class_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY account_types
    ADD CONSTRAINT account_types_account_class_id_fkey FOREIGN KEY (account_class_id) REFERENCES account_class(account_class_id);


--
-- Name: account_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY account_types
    ADD CONSTRAINT account_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: accounts_account_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY accounts
    ADD CONSTRAINT accounts_account_type_id_fkey FOREIGN KEY (account_type_id) REFERENCES account_types(account_type_id);


--
-- Name: accounts_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY accounts
    ADD CONSTRAINT accounts_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: address_address_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY address
    ADD CONSTRAINT address_address_type_id_fkey FOREIGN KEY (address_type_id) REFERENCES address_types(address_type_id);


--
-- Name: address_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY address
    ADD CONSTRAINT address_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: address_sys_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY address
    ADD CONSTRAINT address_sys_country_id_fkey FOREIGN KEY (sys_country_id) REFERENCES sys_countrys(sys_country_id);


--
-- Name: address_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY address_types
    ADD CONSTRAINT address_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: adjustments_adjustment_effect_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY adjustments
    ADD CONSTRAINT adjustments_adjustment_effect_id_fkey FOREIGN KEY (adjustment_effect_id) REFERENCES adjustment_effects(adjustment_effect_id);


--
-- Name: adjustments_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY adjustments
    ADD CONSTRAINT adjustments_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: adjustments_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY adjustments
    ADD CONSTRAINT adjustments_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: advance_deductions_employee_month_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY advance_deductions
    ADD CONSTRAINT advance_deductions_employee_month_id_fkey FOREIGN KEY (employee_month_id) REFERENCES employee_month(employee_month_id);


--
-- Name: advance_deductions_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY advance_deductions
    ADD CONSTRAINT advance_deductions_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: amortisation_asset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY amortisation
    ADD CONSTRAINT amortisation_asset_id_fkey FOREIGN KEY (asset_id) REFERENCES assets(asset_id);


--
-- Name: amortisation_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY amortisation
    ADD CONSTRAINT amortisation_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: applicants_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applicants
    ADD CONSTRAINT applicants_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: applicants_disability_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applicants
    ADD CONSTRAINT applicants_disability_id_fkey FOREIGN KEY (disability_id) REFERENCES disability(disability_id);


--
-- Name: applicants_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applicants
    ADD CONSTRAINT applicants_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: applicants_nationality_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applicants
    ADD CONSTRAINT applicants_nationality_fkey FOREIGN KEY (nationality) REFERENCES sys_countrys(sys_country_id);


--
-- Name: applicants_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applicants
    ADD CONSTRAINT applicants_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: applications_contract_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applications
    ADD CONSTRAINT applications_contract_status_id_fkey FOREIGN KEY (contract_status_id) REFERENCES contract_status(contract_status_id);


--
-- Name: applications_contract_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applications
    ADD CONSTRAINT applications_contract_type_id_fkey FOREIGN KEY (contract_type_id) REFERENCES contract_types(contract_type_id);


--
-- Name: applications_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applications
    ADD CONSTRAINT applications_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: applications_employee_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applications
    ADD CONSTRAINT applications_employee_id_fkey FOREIGN KEY (employee_id) REFERENCES employees(entity_id);


--
-- Name: applications_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applications
    ADD CONSTRAINT applications_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: applications_intake_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applications
    ADD CONSTRAINT applications_intake_id_fkey FOREIGN KEY (intake_id) REFERENCES intake(intake_id);


--
-- Name: applications_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY applications
    ADD CONSTRAINT applications_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: approval_checklists_approval_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY approval_checklists
    ADD CONSTRAINT approval_checklists_approval_id_fkey FOREIGN KEY (approval_id) REFERENCES approvals(approval_id);


--
-- Name: approval_checklists_checklist_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY approval_checklists
    ADD CONSTRAINT approval_checklists_checklist_id_fkey FOREIGN KEY (checklist_id) REFERENCES checklists(checklist_id);


--
-- Name: approval_checklists_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY approval_checklists
    ADD CONSTRAINT approval_checklists_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: approvals_app_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY approvals
    ADD CONSTRAINT approvals_app_entity_id_fkey FOREIGN KEY (app_entity_id) REFERENCES entitys(entity_id);


--
-- Name: approvals_org_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY approvals
    ADD CONSTRAINT approvals_org_entity_id_fkey FOREIGN KEY (org_entity_id) REFERENCES entitys(entity_id);


--
-- Name: approvals_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY approvals
    ADD CONSTRAINT approvals_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: approvals_workflow_phase_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY approvals
    ADD CONSTRAINT approvals_workflow_phase_id_fkey FOREIGN KEY (workflow_phase_id) REFERENCES workflow_phases(workflow_phase_id);


--
-- Name: aptitude_grades_aptitude_test_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY aptitude_grades
    ADD CONSTRAINT aptitude_grades_aptitude_test_id_fkey FOREIGN KEY (aptitude_test_id) REFERENCES aptitude_tests(aptitude_test_id);


--
-- Name: aptitude_grades_graded_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY aptitude_grades
    ADD CONSTRAINT aptitude_grades_graded_by_fkey FOREIGN KEY (graded_by) REFERENCES entitys(entity_id);


--
-- Name: aptitude_grades_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY aptitude_grades
    ADD CONSTRAINT aptitude_grades_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: aptitude_grades_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY aptitude_grades
    ADD CONSTRAINT aptitude_grades_user_id_fkey FOREIGN KEY (user_id) REFERENCES entitys(entity_id);


--
-- Name: aptitude_ongoing_aptitude_test_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY aptitude_ongoing
    ADD CONSTRAINT aptitude_ongoing_aptitude_test_id_fkey FOREIGN KEY (aptitude_test_id) REFERENCES aptitude_tests(aptitude_test_id);


--
-- Name: aptitude_tests_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY aptitude_tests
    ADD CONSTRAINT aptitude_tests_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: asset_movement_asset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_movement
    ADD CONSTRAINT asset_movement_asset_id_fkey FOREIGN KEY (asset_id) REFERENCES assets(asset_id);


--
-- Name: asset_movement_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_movement
    ADD CONSTRAINT asset_movement_department_id_fkey FOREIGN KEY (department_id) REFERENCES departments(department_id);


--
-- Name: asset_movement_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_movement
    ADD CONSTRAINT asset_movement_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: asset_types_accumulated_account_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_types
    ADD CONSTRAINT asset_types_accumulated_account_fkey FOREIGN KEY (accumulated_account) REFERENCES accounts(account_id);


--
-- Name: asset_types_asset_account_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_types
    ADD CONSTRAINT asset_types_asset_account_fkey FOREIGN KEY (asset_account) REFERENCES accounts(account_id);


--
-- Name: asset_types_depreciation_account_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_types
    ADD CONSTRAINT asset_types_depreciation_account_fkey FOREIGN KEY (depreciation_account) REFERENCES accounts(account_id);


--
-- Name: asset_types_disposal_account_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_types
    ADD CONSTRAINT asset_types_disposal_account_fkey FOREIGN KEY (disposal_account) REFERENCES accounts(account_id);


--
-- Name: asset_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_types
    ADD CONSTRAINT asset_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: asset_types_valuation_account_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_types
    ADD CONSTRAINT asset_types_valuation_account_fkey FOREIGN KEY (valuation_account) REFERENCES accounts(account_id);


--
-- Name: asset_valuations_asset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_valuations
    ADD CONSTRAINT asset_valuations_asset_id_fkey FOREIGN KEY (asset_id) REFERENCES assets(asset_id);


--
-- Name: asset_valuations_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY asset_valuations
    ADD CONSTRAINT asset_valuations_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: assets_asset_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY assets
    ADD CONSTRAINT assets_asset_type_id_fkey FOREIGN KEY (asset_type_id) REFERENCES asset_types(asset_type_id);


--
-- Name: assets_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY assets
    ADD CONSTRAINT assets_item_id_fkey FOREIGN KEY (item_id) REFERENCES items(item_id);


--
-- Name: assets_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY assets
    ADD CONSTRAINT assets_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: attendance_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY attendance
    ADD CONSTRAINT attendance_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: attendance_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY attendance
    ADD CONSTRAINT attendance_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: bank_accounts_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY bank_accounts
    ADD CONSTRAINT bank_accounts_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts(account_id);


--
-- Name: bank_accounts_bank_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY bank_accounts
    ADD CONSTRAINT bank_accounts_bank_branch_id_fkey FOREIGN KEY (bank_branch_id) REFERENCES bank_branch(bank_branch_id);


--
-- Name: bank_accounts_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY bank_accounts
    ADD CONSTRAINT bank_accounts_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: bank_accounts_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY bank_accounts
    ADD CONSTRAINT bank_accounts_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: bank_branch_bank_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY bank_branch
    ADD CONSTRAINT bank_branch_bank_id_fkey FOREIGN KEY (bank_id) REFERENCES banks(bank_id);


--
-- Name: bank_branch_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY bank_branch
    ADD CONSTRAINT bank_branch_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: banks_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY banks
    ADD CONSTRAINT banks_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: banks_sys_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY banks
    ADD CONSTRAINT banks_sys_country_id_fkey FOREIGN KEY (sys_country_id) REFERENCES sys_countrys(sys_country_id);


--
-- Name: bidders_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY bidders
    ADD CONSTRAINT bidders_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: bidders_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY bidders
    ADD CONSTRAINT bidders_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: bidders_tender_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY bidders
    ADD CONSTRAINT bidders_tender_id_fkey FOREIGN KEY (tender_id) REFERENCES tenders(tender_id);


--
-- Name: bio_imports1_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY bio_imports1
    ADD CONSTRAINT bio_imports1_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: budget_lines_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budget_lines
    ADD CONSTRAINT budget_lines_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts(account_id);


--
-- Name: budget_lines_budget_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budget_lines
    ADD CONSTRAINT budget_lines_budget_id_fkey FOREIGN KEY (budget_id) REFERENCES budgets(budget_id);


--
-- Name: budget_lines_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budget_lines
    ADD CONSTRAINT budget_lines_item_id_fkey FOREIGN KEY (item_id) REFERENCES items(item_id);


--
-- Name: budget_lines_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budget_lines
    ADD CONSTRAINT budget_lines_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: budget_lines_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budget_lines
    ADD CONSTRAINT budget_lines_period_id_fkey FOREIGN KEY (period_id) REFERENCES periods(period_id);


--
-- Name: budget_lines_transaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budget_lines
    ADD CONSTRAINT budget_lines_transaction_id_fkey FOREIGN KEY (transaction_id) REFERENCES transactions(transaction_id);


--
-- Name: budgets_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budgets
    ADD CONSTRAINT budgets_department_id_fkey FOREIGN KEY (department_id) REFERENCES departments(department_id);


--
-- Name: budgets_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budgets
    ADD CONSTRAINT budgets_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: budgets_fiscal_year_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budgets
    ADD CONSTRAINT budgets_fiscal_year_id_fkey FOREIGN KEY (fiscal_year_id) REFERENCES fiscal_years(fiscal_year_id);


--
-- Name: budgets_link_budget_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budgets
    ADD CONSTRAINT budgets_link_budget_id_fkey FOREIGN KEY (link_budget_id) REFERENCES budgets(budget_id);


--
-- Name: budgets_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY budgets
    ADD CONSTRAINT budgets_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: career_development_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY career_development
    ADD CONSTRAINT career_development_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: case_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY case_types
    ADD CONSTRAINT case_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: casual_application_casual_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY casual_application
    ADD CONSTRAINT casual_application_casual_category_id_fkey FOREIGN KEY (casual_category_id) REFERENCES casual_category(casual_category_id);


--
-- Name: casual_application_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY casual_application
    ADD CONSTRAINT casual_application_department_id_fkey FOREIGN KEY (department_id) REFERENCES departments(department_id);


--
-- Name: casual_application_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY casual_application
    ADD CONSTRAINT casual_application_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: casual_application_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY casual_application
    ADD CONSTRAINT casual_application_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: casual_category_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY casual_category
    ADD CONSTRAINT casual_category_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: casuals_casual_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY casuals
    ADD CONSTRAINT casuals_casual_application_id_fkey FOREIGN KEY (casual_application_id) REFERENCES casual_application(casual_application_id);


--
-- Name: casuals_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY casuals
    ADD CONSTRAINT casuals_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: casuals_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY casuals
    ADD CONSTRAINT casuals_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: checklists_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY checklists
    ADD CONSTRAINT checklists_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: checklists_workflow_phase_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY checklists
    ADD CONSTRAINT checklists_workflow_phase_id_fkey FOREIGN KEY (workflow_phase_id) REFERENCES workflow_phases(workflow_phase_id);


--
-- Name: claim_details_claim_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY claim_details
    ADD CONSTRAINT claim_details_claim_id_fkey FOREIGN KEY (claim_id) REFERENCES claims(claim_id);


--
-- Name: claim_details_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY claim_details
    ADD CONSTRAINT claim_details_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: claim_details_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY claim_details
    ADD CONSTRAINT claim_details_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: claim_types_adjustment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY claim_types
    ADD CONSTRAINT claim_types_adjustment_id_fkey FOREIGN KEY (adjustment_id) REFERENCES adjustments(adjustment_id);


--
-- Name: claim_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY claim_types
    ADD CONSTRAINT claim_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: claims_claim_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY claims
    ADD CONSTRAINT claims_claim_type_id_fkey FOREIGN KEY (claim_type_id) REFERENCES claim_types(claim_type_id);


--
-- Name: claims_employee_adjustment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY claims
    ADD CONSTRAINT claims_employee_adjustment_id_fkey FOREIGN KEY (employee_adjustment_id) REFERENCES employee_adjustments(employee_adjustment_id);


--
-- Name: claims_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY claims
    ADD CONSTRAINT claims_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: claims_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY claims
    ADD CONSTRAINT claims_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: contract_status_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY contract_status
    ADD CONSTRAINT contract_status_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: contract_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY contract_types
    ADD CONSTRAINT contract_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: contracts_bidder_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY contracts
    ADD CONSTRAINT contracts_bidder_id_fkey FOREIGN KEY (bidder_id) REFERENCES bidders(bidder_id);


--
-- Name: contracts_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY contracts
    ADD CONSTRAINT contracts_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: currency_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY currency
    ADD CONSTRAINT currency_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: currency_rates_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY currency_rates
    ADD CONSTRAINT currency_rates_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: currency_rates_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY currency_rates
    ADD CONSTRAINT currency_rates_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: cv_projects_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY cv_projects
    ADD CONSTRAINT cv_projects_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: cv_projects_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY cv_projects
    ADD CONSTRAINT cv_projects_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: cv_seminars_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY cv_seminars
    ADD CONSTRAINT cv_seminars_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: cv_seminars_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY cv_seminars
    ADD CONSTRAINT cv_seminars_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: day_works_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY day_works
    ADD CONSTRAINT day_works_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: day_works_farm_field_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY day_works
    ADD CONSTRAINT day_works_farm_field_id_fkey FOREIGN KEY (farm_field_id) REFERENCES farm_fields(farm_field_id);


--
-- Name: day_works_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY day_works
    ADD CONSTRAINT day_works_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: day_works_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY day_works
    ADD CONSTRAINT day_works_period_id_fkey FOREIGN KEY (period_id) REFERENCES periods(period_id);


--
-- Name: default_accounts_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_accounts
    ADD CONSTRAINT default_accounts_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts(account_id);


--
-- Name: default_accounts_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_accounts
    ADD CONSTRAINT default_accounts_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: default_accounts_use_key_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_accounts
    ADD CONSTRAINT default_accounts_use_key_id_fkey FOREIGN KEY (use_key_id) REFERENCES use_keys(use_key_id);


--
-- Name: default_adjustments_adjustment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_adjustments
    ADD CONSTRAINT default_adjustments_adjustment_id_fkey FOREIGN KEY (adjustment_id) REFERENCES adjustments(adjustment_id);


--
-- Name: default_adjustments_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_adjustments
    ADD CONSTRAINT default_adjustments_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: default_adjustments_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_adjustments
    ADD CONSTRAINT default_adjustments_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: default_banking_bank_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_banking
    ADD CONSTRAINT default_banking_bank_branch_id_fkey FOREIGN KEY (bank_branch_id) REFERENCES bank_branch(bank_branch_id);


--
-- Name: default_banking_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_banking
    ADD CONSTRAINT default_banking_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: default_banking_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_banking
    ADD CONSTRAINT default_banking_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: default_banking_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_banking
    ADD CONSTRAINT default_banking_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: default_tax_types_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_tax_types
    ADD CONSTRAINT default_tax_types_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: default_tax_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_tax_types
    ADD CONSTRAINT default_tax_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: default_tax_types_tax_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY default_tax_types
    ADD CONSTRAINT default_tax_types_tax_type_id_fkey FOREIGN KEY (tax_type_id) REFERENCES tax_types(tax_type_id);


--
-- Name: define_phases_entity_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY define_phases
    ADD CONSTRAINT define_phases_entity_type_id_fkey FOREIGN KEY (entity_type_id) REFERENCES entity_types(entity_type_id);


--
-- Name: define_phases_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY define_phases
    ADD CONSTRAINT define_phases_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: define_phases_project_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY define_phases
    ADD CONSTRAINT define_phases_project_type_id_fkey FOREIGN KEY (project_type_id) REFERENCES project_types(project_type_id);


--
-- Name: define_tasks_define_phase_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY define_tasks
    ADD CONSTRAINT define_tasks_define_phase_id_fkey FOREIGN KEY (define_phase_id) REFERENCES define_phases(define_phase_id);


--
-- Name: define_tasks_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY define_tasks
    ADD CONSTRAINT define_tasks_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: department_roles_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY department_roles
    ADD CONSTRAINT department_roles_department_id_fkey FOREIGN KEY (department_id) REFERENCES departments(department_id);


--
-- Name: department_roles_jobs_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY department_roles
    ADD CONSTRAINT department_roles_jobs_category_id_fkey FOREIGN KEY (jobs_category_id) REFERENCES jobs_category(jobs_category_id);


--
-- Name: department_roles_ln_department_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY department_roles
    ADD CONSTRAINT department_roles_ln_department_role_id_fkey FOREIGN KEY (ln_department_role_id) REFERENCES department_roles(department_role_id);


--
-- Name: department_roles_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY department_roles
    ADD CONSTRAINT department_roles_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: departments_ln_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY departments
    ADD CONSTRAINT departments_ln_department_id_fkey FOREIGN KEY (ln_department_id) REFERENCES departments(department_id);


--
-- Name: departments_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY departments
    ADD CONSTRAINT departments_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: disability_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY disability
    ADD CONSTRAINT disability_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: education_class_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY education_class
    ADD CONSTRAINT education_class_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: education_education_class_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY education
    ADD CONSTRAINT education_education_class_id_fkey FOREIGN KEY (education_class_id) REFERENCES education_class(education_class_id);


--
-- Name: education_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY education
    ADD CONSTRAINT education_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: education_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY education
    ADD CONSTRAINT education_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_adjustments_adjustment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_adjustments
    ADD CONSTRAINT employee_adjustments_adjustment_id_fkey FOREIGN KEY (adjustment_id) REFERENCES adjustments(adjustment_id);


--
-- Name: employee_adjustments_employee_month_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_adjustments
    ADD CONSTRAINT employee_adjustments_employee_month_id_fkey FOREIGN KEY (employee_month_id) REFERENCES employee_month(employee_month_id);


--
-- Name: employee_adjustments_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_adjustments
    ADD CONSTRAINT employee_adjustments_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_adjustments_pension_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_adjustments
    ADD CONSTRAINT employee_adjustments_pension_id_fkey FOREIGN KEY (pension_id) REFERENCES pensions(pension_id);


--
-- Name: employee_advances_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_advances
    ADD CONSTRAINT employee_advances_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: employee_advances_employee_month_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_advances
    ADD CONSTRAINT employee_advances_employee_month_id_fkey FOREIGN KEY (employee_month_id) REFERENCES employee_month(employee_month_id);


--
-- Name: employee_advances_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_advances
    ADD CONSTRAINT employee_advances_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: employee_advances_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_advances
    ADD CONSTRAINT employee_advances_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_banking_bank_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_banking
    ADD CONSTRAINT employee_banking_bank_branch_id_fkey FOREIGN KEY (bank_branch_id) REFERENCES bank_branch(bank_branch_id);


--
-- Name: employee_banking_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_banking
    ADD CONSTRAINT employee_banking_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: employee_banking_employee_month_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_banking
    ADD CONSTRAINT employee_banking_employee_month_id_fkey FOREIGN KEY (employee_month_id) REFERENCES employee_month(employee_month_id);


--
-- Name: employee_banking_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_banking
    ADD CONSTRAINT employee_banking_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_cases_case_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_cases
    ADD CONSTRAINT employee_cases_case_type_id_fkey FOREIGN KEY (case_type_id) REFERENCES case_types(case_type_id);


--
-- Name: employee_cases_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_cases
    ADD CONSTRAINT employee_cases_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: employee_cases_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_cases
    ADD CONSTRAINT employee_cases_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_leave_contact_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_leave
    ADD CONSTRAINT employee_leave_contact_entity_id_fkey FOREIGN KEY (contact_entity_id) REFERENCES entitys(entity_id);


--
-- Name: employee_leave_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_leave
    ADD CONSTRAINT employee_leave_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: employee_leave_leave_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_leave
    ADD CONSTRAINT employee_leave_leave_type_id_fkey FOREIGN KEY (leave_type_id) REFERENCES leave_types(leave_type_id);


--
-- Name: employee_leave_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_leave
    ADD CONSTRAINT employee_leave_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_leave_types_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_leave_types
    ADD CONSTRAINT employee_leave_types_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: employee_leave_types_leave_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_leave_types
    ADD CONSTRAINT employee_leave_types_leave_type_id_fkey FOREIGN KEY (leave_type_id) REFERENCES leave_types(leave_type_id);


--
-- Name: employee_leave_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_leave_types
    ADD CONSTRAINT employee_leave_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_month_bank_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_month
    ADD CONSTRAINT employee_month_bank_branch_id_fkey FOREIGN KEY (bank_branch_id) REFERENCES bank_branch(bank_branch_id);


--
-- Name: employee_month_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_month
    ADD CONSTRAINT employee_month_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: employee_month_department_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_month
    ADD CONSTRAINT employee_month_department_role_id_fkey FOREIGN KEY (department_role_id) REFERENCES department_roles(department_role_id);


--
-- Name: employee_month_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_month
    ADD CONSTRAINT employee_month_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: employee_month_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_month
    ADD CONSTRAINT employee_month_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_month_pay_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_month
    ADD CONSTRAINT employee_month_pay_group_id_fkey FOREIGN KEY (pay_group_id) REFERENCES pay_groups(pay_group_id);


--
-- Name: employee_month_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_month
    ADD CONSTRAINT employee_month_period_id_fkey FOREIGN KEY (period_id) REFERENCES periods(period_id);


--
-- Name: employee_objectives_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_objectives
    ADD CONSTRAINT employee_objectives_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: employee_objectives_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_objectives
    ADD CONSTRAINT employee_objectives_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_overtime_employee_month_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_overtime
    ADD CONSTRAINT employee_overtime_employee_month_id_fkey FOREIGN KEY (employee_month_id) REFERENCES employee_month(employee_month_id);


--
-- Name: employee_overtime_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_overtime
    ADD CONSTRAINT employee_overtime_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_per_diem_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_per_diem
    ADD CONSTRAINT employee_per_diem_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: employee_per_diem_employee_month_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_per_diem
    ADD CONSTRAINT employee_per_diem_employee_month_id_fkey FOREIGN KEY (employee_month_id) REFERENCES employee_month(employee_month_id);


--
-- Name: employee_per_diem_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_per_diem
    ADD CONSTRAINT employee_per_diem_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_tax_types_employee_month_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_tax_types
    ADD CONSTRAINT employee_tax_types_employee_month_id_fkey FOREIGN KEY (employee_month_id) REFERENCES employee_month(employee_month_id);


--
-- Name: employee_tax_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_tax_types
    ADD CONSTRAINT employee_tax_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_tax_types_tax_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_tax_types
    ADD CONSTRAINT employee_tax_types_tax_type_id_fkey FOREIGN KEY (tax_type_id) REFERENCES tax_types(tax_type_id);


--
-- Name: employee_trainings_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_trainings
    ADD CONSTRAINT employee_trainings_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: employee_trainings_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_trainings
    ADD CONSTRAINT employee_trainings_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employee_trainings_training_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employee_trainings
    ADD CONSTRAINT employee_trainings_training_id_fkey FOREIGN KEY (training_id) REFERENCES trainings(training_id);


--
-- Name: employees_bank_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_bank_branch_id_fkey FOREIGN KEY (bank_branch_id) REFERENCES bank_branch(bank_branch_id);


--
-- Name: employees_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: employees_department_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_department_role_id_fkey FOREIGN KEY (department_role_id) REFERENCES department_roles(department_role_id);


--
-- Name: employees_disability_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_disability_id_fkey FOREIGN KEY (disability_id) REFERENCES disability(disability_id);


--
-- Name: employees_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: employees_location_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_location_id_fkey FOREIGN KEY (location_id) REFERENCES locations(location_id);


--
-- Name: employees_nation_of_birth_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_nation_of_birth_fkey FOREIGN KEY (nation_of_birth) REFERENCES sys_countrys(sys_country_id);


--
-- Name: employees_nationality_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_nationality_fkey FOREIGN KEY (nationality) REFERENCES sys_countrys(sys_country_id);


--
-- Name: employees_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: employees_pay_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_pay_group_id_fkey FOREIGN KEY (pay_group_id) REFERENCES pay_groups(pay_group_id);


--
-- Name: employees_pay_scale_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_pay_scale_id_fkey FOREIGN KEY (pay_scale_id) REFERENCES pay_scales(pay_scale_id);


--
-- Name: employees_pay_scale_step_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employees
    ADD CONSTRAINT employees_pay_scale_step_id_fkey FOREIGN KEY (pay_scale_step_id) REFERENCES pay_scale_steps(pay_scale_step_id);


--
-- Name: employment_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employment
    ADD CONSTRAINT employment_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: employment_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY employment
    ADD CONSTRAINT employment_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: entity_subscriptions_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entity_subscriptions
    ADD CONSTRAINT entity_subscriptions_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: entity_subscriptions_entity_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entity_subscriptions
    ADD CONSTRAINT entity_subscriptions_entity_type_id_fkey FOREIGN KEY (entity_type_id) REFERENCES entity_types(entity_type_id);


--
-- Name: entity_subscriptions_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entity_subscriptions
    ADD CONSTRAINT entity_subscriptions_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: entity_subscriptions_subscription_level_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entity_subscriptions
    ADD CONSTRAINT entity_subscriptions_subscription_level_id_fkey FOREIGN KEY (subscription_level_id) REFERENCES subscription_levels(subscription_level_id);


--
-- Name: entity_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entity_types
    ADD CONSTRAINT entity_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: entity_types_use_key_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entity_types
    ADD CONSTRAINT entity_types_use_key_id_fkey FOREIGN KEY (use_key_id) REFERENCES use_keys(use_key_id);


--
-- Name: entitys_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entitys
    ADD CONSTRAINT entitys_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts(account_id);


--
-- Name: entitys_entity_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entitys
    ADD CONSTRAINT entitys_entity_type_id_fkey FOREIGN KEY (entity_type_id) REFERENCES entity_types(entity_type_id);


--
-- Name: entitys_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entitys
    ADD CONSTRAINT entitys_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: entitys_use_key_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entitys
    ADD CONSTRAINT entitys_use_key_id_fkey FOREIGN KEY (use_key_id) REFERENCES use_keys(use_key_id);


--
-- Name: entry_forms_entered_by_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entry_forms
    ADD CONSTRAINT entry_forms_entered_by_id_fkey FOREIGN KEY (entered_by_id) REFERENCES entitys(entity_id);


--
-- Name: entry_forms_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entry_forms
    ADD CONSTRAINT entry_forms_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: entry_forms_form_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entry_forms
    ADD CONSTRAINT entry_forms_form_id_fkey FOREIGN KEY (form_id) REFERENCES forms(form_id);


--
-- Name: entry_forms_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY entry_forms
    ADD CONSTRAINT entry_forms_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: evaluation_points_career_development_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY evaluation_points
    ADD CONSTRAINT evaluation_points_career_development_id_fkey FOREIGN KEY (career_development_id) REFERENCES career_development(career_development_id);


--
-- Name: evaluation_points_job_review_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY evaluation_points
    ADD CONSTRAINT evaluation_points_job_review_id_fkey FOREIGN KEY (job_review_id) REFERENCES job_reviews(job_review_id);


--
-- Name: evaluation_points_objective_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY evaluation_points
    ADD CONSTRAINT evaluation_points_objective_id_fkey FOREIGN KEY (objective_id) REFERENCES objectives(objective_id);


--
-- Name: evaluation_points_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY evaluation_points
    ADD CONSTRAINT evaluation_points_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: evaluation_points_review_point_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY evaluation_points
    ADD CONSTRAINT evaluation_points_review_point_id_fkey FOREIGN KEY (review_point_id) REFERENCES review_points(review_point_id);


--
-- Name: farm_fields_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY farm_fields
    ADD CONSTRAINT farm_fields_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: fields_form_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY fields
    ADD CONSTRAINT fields_form_id_fkey FOREIGN KEY (form_id) REFERENCES forms(form_id);


--
-- Name: fields_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY fields
    ADD CONSTRAINT fields_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: fiscal_years_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY fiscal_years
    ADD CONSTRAINT fiscal_years_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: follow_up_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY follow_up
    ADD CONSTRAINT follow_up_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: follow_up_lead_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY follow_up
    ADD CONSTRAINT follow_up_lead_item_id_fkey FOREIGN KEY (lead_item_id) REFERENCES lead_items(lead_item_id);


--
-- Name: follow_up_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY follow_up
    ADD CONSTRAINT follow_up_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: forms_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY forms
    ADD CONSTRAINT forms_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: gls_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY gls
    ADD CONSTRAINT gls_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts(account_id);


--
-- Name: gls_journal_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY gls
    ADD CONSTRAINT gls_journal_id_fkey FOREIGN KEY (journal_id) REFERENCES journals(journal_id);


--
-- Name: gls_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY gls
    ADD CONSTRAINT gls_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: helpdesk_client_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY helpdesk
    ADD CONSTRAINT helpdesk_client_id_fkey FOREIGN KEY (client_id) REFERENCES entitys(entity_id);


--
-- Name: helpdesk_closed_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY helpdesk
    ADD CONSTRAINT helpdesk_closed_by_fkey FOREIGN KEY (closed_by) REFERENCES entitys(entity_id);


--
-- Name: helpdesk_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY helpdesk
    ADD CONSTRAINT helpdesk_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: helpdesk_pdefinition_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY helpdesk
    ADD CONSTRAINT helpdesk_pdefinition_id_fkey FOREIGN KEY (pdefinition_id) REFERENCES pdefinitions(pdefinition_id);


--
-- Name: helpdesk_plevel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY helpdesk
    ADD CONSTRAINT helpdesk_plevel_id_fkey FOREIGN KEY (plevel_id) REFERENCES plevels(plevel_id);


--
-- Name: helpdesk_recorded_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY helpdesk
    ADD CONSTRAINT helpdesk_recorded_by_fkey FOREIGN KEY (recorded_by) REFERENCES entitys(entity_id);


--
-- Name: holidays_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY holidays
    ADD CONSTRAINT holidays_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: identification_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY identification_types
    ADD CONSTRAINT identification_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: identifications_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY identifications
    ADD CONSTRAINT identifications_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: identifications_identification_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY identifications
    ADD CONSTRAINT identifications_identification_type_id_fkey FOREIGN KEY (identification_type_id) REFERENCES identification_types(identification_type_id);


--
-- Name: identifications_nationality_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY identifications
    ADD CONSTRAINT identifications_nationality_fkey FOREIGN KEY (nationality) REFERENCES sys_countrys(sys_country_id);


--
-- Name: identifications_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY identifications
    ADD CONSTRAINT identifications_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: industry_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY industry
    ADD CONSTRAINT industry_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: intake_department_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY intake
    ADD CONSTRAINT intake_department_role_id_fkey FOREIGN KEY (department_role_id) REFERENCES department_roles(department_role_id);


--
-- Name: intake_location_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY intake
    ADD CONSTRAINT intake_location_id_fkey FOREIGN KEY (location_id) REFERENCES locations(location_id);


--
-- Name: intake_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY intake
    ADD CONSTRAINT intake_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: intake_pay_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY intake
    ADD CONSTRAINT intake_pay_group_id_fkey FOREIGN KEY (pay_group_id) REFERENCES pay_groups(pay_group_id);


--
-- Name: intake_pay_scale_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY intake
    ADD CONSTRAINT intake_pay_scale_id_fkey FOREIGN KEY (pay_scale_id) REFERENCES pay_scales(pay_scale_id);


--
-- Name: interns_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY interns
    ADD CONSTRAINT interns_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: interns_internship_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY interns
    ADD CONSTRAINT interns_internship_id_fkey FOREIGN KEY (internship_id) REFERENCES internships(internship_id);


--
-- Name: interns_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY interns
    ADD CONSTRAINT interns_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: internships_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY internships
    ADD CONSTRAINT internships_department_id_fkey FOREIGN KEY (department_id) REFERENCES departments(department_id);


--
-- Name: internships_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY internships
    ADD CONSTRAINT internships_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: item_category_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY item_category
    ADD CONSTRAINT item_category_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: item_units_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY item_units
    ADD CONSTRAINT item_units_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: items_item_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY items
    ADD CONSTRAINT items_item_category_id_fkey FOREIGN KEY (item_category_id) REFERENCES item_category(item_category_id);


--
-- Name: items_item_unit_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY items
    ADD CONSTRAINT items_item_unit_id_fkey FOREIGN KEY (item_unit_id) REFERENCES item_units(item_unit_id);


--
-- Name: items_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY items
    ADD CONSTRAINT items_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: items_purchase_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY items
    ADD CONSTRAINT items_purchase_account_id_fkey FOREIGN KEY (purchase_account_id) REFERENCES accounts(account_id);


--
-- Name: items_sales_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY items
    ADD CONSTRAINT items_sales_account_id_fkey FOREIGN KEY (sales_account_id) REFERENCES accounts(account_id);


--
-- Name: items_tax_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY items
    ADD CONSTRAINT items_tax_type_id_fkey FOREIGN KEY (tax_type_id) REFERENCES tax_types(tax_type_id);


--
-- Name: job_reviews_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY job_reviews
    ADD CONSTRAINT job_reviews_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: job_reviews_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY job_reviews
    ADD CONSTRAINT job_reviews_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: job_reviews_review_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY job_reviews
    ADD CONSTRAINT job_reviews_review_category_id_fkey FOREIGN KEY (review_category_id) REFERENCES review_category(review_category_id);


--
-- Name: jobs_category_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY jobs_category
    ADD CONSTRAINT jobs_category_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: journals_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY journals
    ADD CONSTRAINT journals_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: journals_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY journals
    ADD CONSTRAINT journals_department_id_fkey FOREIGN KEY (department_id) REFERENCES departments(department_id);


--
-- Name: journals_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY journals
    ADD CONSTRAINT journals_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: journals_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY journals
    ADD CONSTRAINT journals_period_id_fkey FOREIGN KEY (period_id) REFERENCES periods(period_id);


--
-- Name: kin_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY kin_types
    ADD CONSTRAINT kin_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: kins_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY kins
    ADD CONSTRAINT kins_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: kins_kin_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY kins
    ADD CONSTRAINT kins_kin_type_id_fkey FOREIGN KEY (kin_type_id) REFERENCES kin_types(kin_type_id);


--
-- Name: kins_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY kins
    ADD CONSTRAINT kins_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: lead_items_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lead_items
    ADD CONSTRAINT lead_items_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: lead_items_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lead_items
    ADD CONSTRAINT lead_items_item_id_fkey FOREIGN KEY (item_id) REFERENCES items(item_id);


--
-- Name: lead_items_lead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lead_items
    ADD CONSTRAINT lead_items_lead_id_fkey FOREIGN KEY (lead_id) REFERENCES leads(lead_id);


--
-- Name: lead_items_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY lead_items
    ADD CONSTRAINT lead_items_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: leads_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY leads
    ADD CONSTRAINT leads_country_id_fkey FOREIGN KEY (country_id) REFERENCES sys_countrys(sys_country_id);


--
-- Name: leads_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY leads
    ADD CONSTRAINT leads_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: leads_industry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY leads
    ADD CONSTRAINT leads_industry_id_fkey FOREIGN KEY (industry_id) REFERENCES industry(industry_id);


--
-- Name: leads_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY leads
    ADD CONSTRAINT leads_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: leave_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY leave_types
    ADD CONSTRAINT leave_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: leave_work_days_employee_leave_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY leave_work_days
    ADD CONSTRAINT leave_work_days_employee_leave_id_fkey FOREIGN KEY (employee_leave_id) REFERENCES employee_leave(employee_leave_id);


--
-- Name: leave_work_days_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY leave_work_days
    ADD CONSTRAINT leave_work_days_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: leave_work_days_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY leave_work_days
    ADD CONSTRAINT leave_work_days_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: ledger_links_ledger_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY ledger_links
    ADD CONSTRAINT ledger_links_ledger_type_id_fkey FOREIGN KEY (ledger_type_id) REFERENCES ledger_types(ledger_type_id);


--
-- Name: ledger_links_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY ledger_links
    ADD CONSTRAINT ledger_links_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: ledger_types_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY ledger_types
    ADD CONSTRAINT ledger_types_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts(account_id);


--
-- Name: ledger_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY ledger_types
    ADD CONSTRAINT ledger_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: ledger_types_tax_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY ledger_types
    ADD CONSTRAINT ledger_types_tax_account_id_fkey FOREIGN KEY (tax_account_id) REFERENCES accounts(account_id);


--
-- Name: loan_monthly_employee_adjustment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY loan_monthly
    ADD CONSTRAINT loan_monthly_employee_adjustment_id_fkey FOREIGN KEY (employee_adjustment_id) REFERENCES employee_adjustments(employee_adjustment_id);


--
-- Name: loan_monthly_loan_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY loan_monthly
    ADD CONSTRAINT loan_monthly_loan_id_fkey FOREIGN KEY (loan_id) REFERENCES loans(loan_id);


--
-- Name: loan_monthly_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY loan_monthly
    ADD CONSTRAINT loan_monthly_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: loan_monthly_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY loan_monthly
    ADD CONSTRAINT loan_monthly_period_id_fkey FOREIGN KEY (period_id) REFERENCES periods(period_id);


--
-- Name: loan_types_adjustment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY loan_types
    ADD CONSTRAINT loan_types_adjustment_id_fkey FOREIGN KEY (adjustment_id) REFERENCES adjustments(adjustment_id);


--
-- Name: loan_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY loan_types
    ADD CONSTRAINT loan_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: loans_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY loans
    ADD CONSTRAINT loans_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: loans_loan_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY loans
    ADD CONSTRAINT loans_loan_type_id_fkey FOREIGN KEY (loan_type_id) REFERENCES loan_types(loan_type_id);


--
-- Name: loans_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY loans
    ADD CONSTRAINT loans_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: locations_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY locations
    ADD CONSTRAINT locations_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: objective_details_ln_objective_detail_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY objective_details
    ADD CONSTRAINT objective_details_ln_objective_detail_id_fkey FOREIGN KEY (ln_objective_detail_id) REFERENCES objective_details(objective_detail_id);


--
-- Name: objective_details_objective_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY objective_details
    ADD CONSTRAINT objective_details_objective_id_fkey FOREIGN KEY (objective_id) REFERENCES objectives(objective_id);


--
-- Name: objective_details_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY objective_details
    ADD CONSTRAINT objective_details_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: objective_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY objective_types
    ADD CONSTRAINT objective_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: objectives_employee_objective_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY objectives
    ADD CONSTRAINT objectives_employee_objective_id_fkey FOREIGN KEY (employee_objective_id) REFERENCES employee_objectives(employee_objective_id);


--
-- Name: objectives_objective_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY objectives
    ADD CONSTRAINT objectives_objective_type_id_fkey FOREIGN KEY (objective_type_id) REFERENCES objective_types(objective_type_id);


--
-- Name: objectives_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY objectives
    ADD CONSTRAINT objectives_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: org_events_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY org_events
    ADD CONSTRAINT org_events_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: orgs_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY orgs
    ADD CONSTRAINT orgs_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: orgs_default_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY orgs
    ADD CONSTRAINT orgs_default_country_id_fkey FOREIGN KEY (default_country_id) REFERENCES sys_countrys(sys_country_id);


--
-- Name: orgs_org_client_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY orgs
    ADD CONSTRAINT orgs_org_client_id_fkey FOREIGN KEY (org_client_id) REFERENCES entitys(entity_id);


--
-- Name: orgs_parent_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY orgs
    ADD CONSTRAINT orgs_parent_org_id_fkey FOREIGN KEY (parent_org_id) REFERENCES orgs(org_id);


--
-- Name: pay_groups_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pay_groups
    ADD CONSTRAINT pay_groups_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pay_scale_steps_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pay_scale_steps
    ADD CONSTRAINT pay_scale_steps_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pay_scale_steps_pay_scale_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pay_scale_steps
    ADD CONSTRAINT pay_scale_steps_pay_scale_id_fkey FOREIGN KEY (pay_scale_id) REFERENCES pay_scales(pay_scale_id);


--
-- Name: pay_scale_years_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pay_scale_years
    ADD CONSTRAINT pay_scale_years_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pay_scale_years_pay_scale_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pay_scale_years
    ADD CONSTRAINT pay_scale_years_pay_scale_id_fkey FOREIGN KEY (pay_scale_id) REFERENCES pay_scales(pay_scale_id);


--
-- Name: pay_scales_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pay_scales
    ADD CONSTRAINT pay_scales_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: pay_scales_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pay_scales
    ADD CONSTRAINT pay_scales_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pc_allocations_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_allocations
    ADD CONSTRAINT pc_allocations_department_id_fkey FOREIGN KEY (department_id) REFERENCES departments(department_id);


--
-- Name: pc_allocations_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_allocations
    ADD CONSTRAINT pc_allocations_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: pc_allocations_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_allocations
    ADD CONSTRAINT pc_allocations_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pc_allocations_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_allocations
    ADD CONSTRAINT pc_allocations_period_id_fkey FOREIGN KEY (period_id) REFERENCES periods(period_id);


--
-- Name: pc_banking_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_banking
    ADD CONSTRAINT pc_banking_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pc_banking_pc_allocation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_banking
    ADD CONSTRAINT pc_banking_pc_allocation_id_fkey FOREIGN KEY (pc_allocation_id) REFERENCES pc_allocations(pc_allocation_id);


--
-- Name: pc_budget_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_budget
    ADD CONSTRAINT pc_budget_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pc_budget_pc_allocation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_budget
    ADD CONSTRAINT pc_budget_pc_allocation_id_fkey FOREIGN KEY (pc_allocation_id) REFERENCES pc_allocations(pc_allocation_id);


--
-- Name: pc_budget_pc_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_budget
    ADD CONSTRAINT pc_budget_pc_item_id_fkey FOREIGN KEY (pc_item_id) REFERENCES pc_items(pc_item_id);


--
-- Name: pc_category_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_category
    ADD CONSTRAINT pc_category_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pc_expenditure_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_expenditure
    ADD CONSTRAINT pc_expenditure_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: pc_expenditure_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_expenditure
    ADD CONSTRAINT pc_expenditure_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pc_expenditure_pc_allocation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_expenditure
    ADD CONSTRAINT pc_expenditure_pc_allocation_id_fkey FOREIGN KEY (pc_allocation_id) REFERENCES pc_allocations(pc_allocation_id);


--
-- Name: pc_expenditure_pc_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_expenditure
    ADD CONSTRAINT pc_expenditure_pc_item_id_fkey FOREIGN KEY (pc_item_id) REFERENCES pc_items(pc_item_id);


--
-- Name: pc_expenditure_pc_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_expenditure
    ADD CONSTRAINT pc_expenditure_pc_type_id_fkey FOREIGN KEY (pc_type_id) REFERENCES pc_types(pc_type_id);


--
-- Name: pc_items_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_items
    ADD CONSTRAINT pc_items_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pc_items_pc_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_items
    ADD CONSTRAINT pc_items_pc_category_id_fkey FOREIGN KEY (pc_category_id) REFERENCES pc_category(pc_category_id);


--
-- Name: pc_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pc_types
    ADD CONSTRAINT pc_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pdefinitions_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pdefinitions
    ADD CONSTRAINT pdefinitions_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: pdefinitions_ptype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pdefinitions
    ADD CONSTRAINT pdefinitions_ptype_id_fkey FOREIGN KEY (ptype_id) REFERENCES ptypes(ptype_id);


--
-- Name: pensions_adjustment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pensions
    ADD CONSTRAINT pensions_adjustment_id_fkey FOREIGN KEY (adjustment_id) REFERENCES adjustments(adjustment_id);


--
-- Name: pensions_contribution_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pensions
    ADD CONSTRAINT pensions_contribution_id_fkey FOREIGN KEY (contribution_id) REFERENCES adjustments(adjustment_id);


--
-- Name: pensions_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pensions
    ADD CONSTRAINT pensions_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: pensions_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY pensions
    ADD CONSTRAINT pensions_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: period_tax_rates_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY period_tax_rates
    ADD CONSTRAINT period_tax_rates_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: period_tax_rates_period_tax_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY period_tax_rates
    ADD CONSTRAINT period_tax_rates_period_tax_type_id_fkey FOREIGN KEY (period_tax_type_id) REFERENCES period_tax_types(period_tax_type_id);


--
-- Name: period_tax_rates_tax_rate_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY period_tax_rates
    ADD CONSTRAINT period_tax_rates_tax_rate_id_fkey FOREIGN KEY (tax_rate_id) REFERENCES tax_rates(tax_rate_id);


--
-- Name: period_tax_types_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY period_tax_types
    ADD CONSTRAINT period_tax_types_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts(account_id);


--
-- Name: period_tax_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY period_tax_types
    ADD CONSTRAINT period_tax_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: period_tax_types_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY period_tax_types
    ADD CONSTRAINT period_tax_types_period_id_fkey FOREIGN KEY (period_id) REFERENCES periods(period_id);


--
-- Name: period_tax_types_tax_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY period_tax_types
    ADD CONSTRAINT period_tax_types_tax_type_id_fkey FOREIGN KEY (tax_type_id) REFERENCES tax_types(tax_type_id);


--
-- Name: periods_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY periods
    ADD CONSTRAINT periods_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: periods_fiscal_year_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY periods
    ADD CONSTRAINT periods_fiscal_year_id_fkey FOREIGN KEY (fiscal_year_id) REFERENCES fiscal_years(fiscal_year_id);


--
-- Name: periods_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY periods
    ADD CONSTRAINT periods_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: phases_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY phases
    ADD CONSTRAINT phases_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: phases_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY phases
    ADD CONSTRAINT phases_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(project_id);


--
-- Name: plevels_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY plevels
    ADD CONSTRAINT plevels_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: product_receipts_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY product_receipts
    ADD CONSTRAINT product_receipts_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: product_receipts_receipt_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY product_receipts
    ADD CONSTRAINT product_receipts_receipt_source_id_fkey FOREIGN KEY (receipt_source_id) REFERENCES receipt_sources(receipt_source_id);


--
-- Name: productions_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY productions
    ADD CONSTRAINT productions_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: productions_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY productions
    ADD CONSTRAINT productions_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: productions_product_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY productions
    ADD CONSTRAINT productions_product_id_fkey FOREIGN KEY (product_id) REFERENCES products(product_id);


--
-- Name: products_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY products
    ADD CONSTRAINT products_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: project_cost_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_cost
    ADD CONSTRAINT project_cost_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: project_cost_phase_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_cost
    ADD CONSTRAINT project_cost_phase_id_fkey FOREIGN KEY (phase_id) REFERENCES phases(phase_id);


--
-- Name: project_staff_costs_employee_month_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_staff_costs
    ADD CONSTRAINT project_staff_costs_employee_month_id_fkey FOREIGN KEY (employee_month_id) REFERENCES employee_month(employee_month_id);


--
-- Name: project_staff_costs_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_staff_costs
    ADD CONSTRAINT project_staff_costs_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: project_staff_costs_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_staff_costs
    ADD CONSTRAINT project_staff_costs_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(project_id);


--
-- Name: project_staff_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_staff
    ADD CONSTRAINT project_staff_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: project_staff_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_staff
    ADD CONSTRAINT project_staff_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: project_staff_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_staff
    ADD CONSTRAINT project_staff_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(project_id);


--
-- Name: project_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_types
    ADD CONSTRAINT project_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: projects_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY projects
    ADD CONSTRAINT projects_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: projects_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY projects
    ADD CONSTRAINT projects_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: projects_project_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY projects
    ADD CONSTRAINT projects_project_type_id_fkey FOREIGN KEY (project_type_id) REFERENCES project_types(project_type_id);


--
-- Name: ptypes_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY ptypes
    ADD CONSTRAINT ptypes_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: quotations_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY quotations
    ADD CONSTRAINT quotations_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: quotations_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY quotations
    ADD CONSTRAINT quotations_item_id_fkey FOREIGN KEY (item_id) REFERENCES items(item_id);


--
-- Name: quotations_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY quotations
    ADD CONSTRAINT quotations_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: receipt_sources_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY receipt_sources
    ADD CONSTRAINT receipt_sources_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: reporting_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reporting
    ADD CONSTRAINT reporting_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: reporting_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reporting
    ADD CONSTRAINT reporting_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: reporting_report_to_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reporting
    ADD CONSTRAINT reporting_report_to_id_fkey FOREIGN KEY (report_to_id) REFERENCES entitys(entity_id);


--
-- Name: review_category_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY review_category
    ADD CONSTRAINT review_category_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: review_points_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY review_points
    ADD CONSTRAINT review_points_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: review_points_review_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY review_points
    ADD CONSTRAINT review_points_review_category_id_fkey FOREIGN KEY (review_category_id) REFERENCES review_category(review_category_id);


--
-- Name: shift_schedule_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY shift_schedule
    ADD CONSTRAINT shift_schedule_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: shift_schedule_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY shift_schedule
    ADD CONSTRAINT shift_schedule_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: shift_schedule_shift_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY shift_schedule
    ADD CONSTRAINT shift_schedule_shift_id_fkey FOREIGN KEY (shift_id) REFERENCES shifts(shift_id);


--
-- Name: shifts_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY shifts
    ADD CONSTRAINT shifts_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: shifts_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY shifts
    ADD CONSTRAINT shifts_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(project_id);


--
-- Name: skill_category_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY skill_category
    ADD CONSTRAINT skill_category_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: skill_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY skill_types
    ADD CONSTRAINT skill_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: skill_types_skill_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY skill_types
    ADD CONSTRAINT skill_types_skill_category_id_fkey FOREIGN KEY (skill_category_id) REFERENCES skill_category(skill_category_id);


--
-- Name: skills_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY skills
    ADD CONSTRAINT skills_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: skills_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY skills
    ADD CONSTRAINT skills_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: skills_skill_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY skills
    ADD CONSTRAINT skills_skill_type_id_fkey FOREIGN KEY (skill_type_id) REFERENCES skill_types(skill_type_id);


--
-- Name: stock_lines_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stock_lines
    ADD CONSTRAINT stock_lines_item_id_fkey FOREIGN KEY (item_id) REFERENCES items(item_id);


--
-- Name: stock_lines_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stock_lines
    ADD CONSTRAINT stock_lines_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: stock_lines_stock_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stock_lines
    ADD CONSTRAINT stock_lines_stock_id_fkey FOREIGN KEY (stock_id) REFERENCES stocks(stock_id);


--
-- Name: stocks_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stocks
    ADD CONSTRAINT stocks_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: stocks_store_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stocks
    ADD CONSTRAINT stocks_store_id_fkey FOREIGN KEY (store_id) REFERENCES stores(store_id);


--
-- Name: stores_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stores
    ADD CONSTRAINT stores_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: sub_fields_field_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sub_fields
    ADD CONSTRAINT sub_fields_field_id_fkey FOREIGN KEY (field_id) REFERENCES fields(field_id);


--
-- Name: sub_fields_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sub_fields
    ADD CONSTRAINT sub_fields_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: subscription_levels_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subscription_levels
    ADD CONSTRAINT subscription_levels_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: subscriptions_account_manager_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subscriptions
    ADD CONSTRAINT subscriptions_account_manager_id_fkey FOREIGN KEY (account_manager_id) REFERENCES entitys(entity_id);


--
-- Name: subscriptions_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subscriptions
    ADD CONSTRAINT subscriptions_country_id_fkey FOREIGN KEY (country_id) REFERENCES sys_countrys(sys_country_id);


--
-- Name: subscriptions_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subscriptions
    ADD CONSTRAINT subscriptions_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: subscriptions_industry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subscriptions
    ADD CONSTRAINT subscriptions_industry_id_fkey FOREIGN KEY (industry_id) REFERENCES industry(industry_id);


--
-- Name: subscriptions_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY subscriptions
    ADD CONSTRAINT subscriptions_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: sys_audit_details_sys_audit_trail_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_audit_details
    ADD CONSTRAINT sys_audit_details_sys_audit_trail_id_fkey FOREIGN KEY (sys_audit_trail_id) REFERENCES sys_audit_trail(sys_audit_trail_id);


--
-- Name: sys_countrys_sys_continent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_countrys
    ADD CONSTRAINT sys_countrys_sys_continent_id_fkey FOREIGN KEY (sys_continent_id) REFERENCES sys_continents(sys_continent_id);


--
-- Name: sys_dashboard_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_dashboard
    ADD CONSTRAINT sys_dashboard_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: sys_dashboard_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_dashboard
    ADD CONSTRAINT sys_dashboard_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: sys_emailed_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_emailed
    ADD CONSTRAINT sys_emailed_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: sys_emailed_sys_email_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_emailed
    ADD CONSTRAINT sys_emailed_sys_email_id_fkey FOREIGN KEY (sys_email_id) REFERENCES sys_emails(sys_email_id);


--
-- Name: sys_emails_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_emails
    ADD CONSTRAINT sys_emails_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: sys_files_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_files
    ADD CONSTRAINT sys_files_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: sys_logins_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_logins
    ADD CONSTRAINT sys_logins_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: sys_news_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_news
    ADD CONSTRAINT sys_news_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: sys_queries_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_queries
    ADD CONSTRAINT sys_queries_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: sys_reset_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_reset
    ADD CONSTRAINT sys_reset_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: sys_reset_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY sys_reset
    ADD CONSTRAINT sys_reset_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: tasks_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tasks
    ADD CONSTRAINT tasks_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: tasks_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tasks
    ADD CONSTRAINT tasks_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: tasks_phase_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tasks
    ADD CONSTRAINT tasks_phase_id_fkey FOREIGN KEY (phase_id) REFERENCES phases(phase_id);


--
-- Name: tax_rates_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tax_rates
    ADD CONSTRAINT tax_rates_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: tax_rates_tax_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tax_rates
    ADD CONSTRAINT tax_rates_tax_type_id_fkey FOREIGN KEY (tax_type_id) REFERENCES tax_types(tax_type_id);


--
-- Name: tax_types_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tax_types
    ADD CONSTRAINT tax_types_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts(account_id);


--
-- Name: tax_types_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tax_types
    ADD CONSTRAINT tax_types_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: tax_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tax_types
    ADD CONSTRAINT tax_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: tax_types_sys_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tax_types
    ADD CONSTRAINT tax_types_sys_country_id_fkey FOREIGN KEY (sys_country_id) REFERENCES sys_countrys(sys_country_id);


--
-- Name: tax_types_use_key_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tax_types
    ADD CONSTRAINT tax_types_use_key_id_fkey FOREIGN KEY (use_key_id) REFERENCES use_keys(use_key_id);


--
-- Name: tender_items_bidder_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tender_items
    ADD CONSTRAINT tender_items_bidder_id_fkey FOREIGN KEY (bidder_id) REFERENCES bidders(bidder_id);


--
-- Name: tender_items_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tender_items
    ADD CONSTRAINT tender_items_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: tender_types_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tender_types
    ADD CONSTRAINT tender_types_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: tenders_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tenders
    ADD CONSTRAINT tenders_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: tenders_tender_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY tenders
    ADD CONSTRAINT tenders_tender_type_id_fkey FOREIGN KEY (tender_type_id) REFERENCES tender_types(tender_type_id);


--
-- Name: timesheet_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY timesheet
    ADD CONSTRAINT timesheet_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: timesheet_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY timesheet
    ADD CONSTRAINT timesheet_task_id_fkey FOREIGN KEY (task_id) REFERENCES tasks(task_id);


--
-- Name: trainings_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY trainings
    ADD CONSTRAINT trainings_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: transaction_counters_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_counters
    ADD CONSTRAINT transaction_counters_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: transaction_counters_transaction_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_counters
    ADD CONSTRAINT transaction_counters_transaction_type_id_fkey FOREIGN KEY (transaction_type_id) REFERENCES transaction_types(transaction_type_id);


--
-- Name: transaction_details_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_details
    ADD CONSTRAINT transaction_details_account_id_fkey FOREIGN KEY (account_id) REFERENCES accounts(account_id);


--
-- Name: transaction_details_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_details
    ADD CONSTRAINT transaction_details_item_id_fkey FOREIGN KEY (item_id) REFERENCES items(item_id);


--
-- Name: transaction_details_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_details
    ADD CONSTRAINT transaction_details_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: transaction_details_store_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_details
    ADD CONSTRAINT transaction_details_store_id_fkey FOREIGN KEY (store_id) REFERENCES stores(store_id);


--
-- Name: transaction_details_transaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_details
    ADD CONSTRAINT transaction_details_transaction_id_fkey FOREIGN KEY (transaction_id) REFERENCES transactions(transaction_id);


--
-- Name: transaction_links_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_links
    ADD CONSTRAINT transaction_links_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: transaction_links_transaction_detail_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_links
    ADD CONSTRAINT transaction_links_transaction_detail_id_fkey FOREIGN KEY (transaction_detail_id) REFERENCES transaction_details(transaction_detail_id);


--
-- Name: transaction_links_transaction_detail_to_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_links
    ADD CONSTRAINT transaction_links_transaction_detail_to_fkey FOREIGN KEY (transaction_detail_to) REFERENCES transaction_details(transaction_detail_id);


--
-- Name: transaction_links_transaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_links
    ADD CONSTRAINT transaction_links_transaction_id_fkey FOREIGN KEY (transaction_id) REFERENCES transactions(transaction_id);


--
-- Name: transaction_links_transaction_to_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transaction_links
    ADD CONSTRAINT transaction_links_transaction_to_fkey FOREIGN KEY (transaction_to) REFERENCES transactions(transaction_id);


--
-- Name: transactions_bank_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_bank_account_id_fkey FOREIGN KEY (bank_account_id) REFERENCES bank_accounts(bank_account_id);


--
-- Name: transactions_currency_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_currency_id_fkey FOREIGN KEY (currency_id) REFERENCES currency(currency_id);


--
-- Name: transactions_department_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_department_id_fkey FOREIGN KEY (department_id) REFERENCES departments(department_id);


--
-- Name: transactions_entered_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_entered_by_fkey FOREIGN KEY (entered_by) REFERENCES entitys(entity_id);


--
-- Name: transactions_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: transactions_journal_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_journal_id_fkey FOREIGN KEY (journal_id) REFERENCES journals(journal_id);


--
-- Name: transactions_ledger_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_ledger_type_id_fkey FOREIGN KEY (ledger_type_id) REFERENCES ledger_types(ledger_type_id);


--
-- Name: transactions_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: transactions_transaction_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_transaction_status_id_fkey FOREIGN KEY (transaction_status_id) REFERENCES transaction_status(transaction_status_id);


--
-- Name: transactions_transaction_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY transactions
    ADD CONSTRAINT transactions_transaction_type_id_fkey FOREIGN KEY (transaction_type_id) REFERENCES transaction_types(transaction_type_id);


--
-- Name: work_rate_changes_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY work_rate_changes
    ADD CONSTRAINT work_rate_changes_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: work_rate_changes_work_rate_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY work_rate_changes
    ADD CONSTRAINT work_rate_changes_work_rate_id_fkey FOREIGN KEY (work_rate_id) REFERENCES work_rates(work_rate_id);


--
-- Name: work_rates_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY work_rates
    ADD CONSTRAINT work_rates_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: workflow_logs_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY workflow_logs
    ADD CONSTRAINT workflow_logs_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: workflow_phases_approval_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY workflow_phases
    ADD CONSTRAINT workflow_phases_approval_entity_id_fkey FOREIGN KEY (approval_entity_id) REFERENCES entity_types(entity_type_id);


--
-- Name: workflow_phases_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY workflow_phases
    ADD CONSTRAINT workflow_phases_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: workflow_phases_workflow_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY workflow_phases
    ADD CONSTRAINT workflow_phases_workflow_id_fkey FOREIGN KEY (workflow_id) REFERENCES workflows(workflow_id);


--
-- Name: workflow_sql_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY workflow_sql
    ADD CONSTRAINT workflow_sql_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: workflow_sql_workflow_phase_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY workflow_sql
    ADD CONSTRAINT workflow_sql_workflow_phase_id_fkey FOREIGN KEY (workflow_phase_id) REFERENCES workflow_phases(workflow_phase_id);


--
-- Name: workflows_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY workflows
    ADD CONSTRAINT workflows_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: workflows_source_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY workflows
    ADD CONSTRAINT workflows_source_entity_id_fkey FOREIGN KEY (source_entity_id) REFERENCES entity_types(entity_type_id);


--
-- Name: works_day_work_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY works
    ADD CONSTRAINT works_day_work_id_fkey FOREIGN KEY (day_work_id) REFERENCES day_works(day_work_id);


--
-- Name: works_entity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY works
    ADD CONSTRAINT works_entity_id_fkey FOREIGN KEY (entity_id) REFERENCES entitys(entity_id);


--
-- Name: works_org_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY works
    ADD CONSTRAINT works_org_id_fkey FOREIGN KEY (org_id) REFERENCES orgs(org_id);


--
-- Name: works_work_rate_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY works
    ADD CONSTRAINT works_work_rate_id_fkey FOREIGN KEY (work_rate_id) REFERENCES work_rates(work_rate_id);


--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
--

