--
--


SELECT pg_catalog.set_config('search_path', '', false);

ALTER TABLE ONLY public.workflow_workflownode_approver DROP CONSTRAINT workflow_workflownod_workflowrole_id_c8e00d42_fk_workflow_;
ALTER TABLE ONLY public.workflow_workflownode_notifier DROP CONSTRAINT workflow_workflownod_workflowrole_id_73de7fc2_fk_workflow_;
ALTER TABLE ONLY public.workflow_workflownode_approver DROP CONSTRAINT workflow_workflownod_workflownode_id_d814c941_fk_workflow_;
ALTER TABLE ONLY public.workflow_workflownode_notifier DROP CONSTRAINT workflow_workflownod_workflownode_id_57298016_fk_workflow_;
ALTER TABLE ONLY public.workflow_workflownode DROP CONSTRAINT workflow_workflownod_workflow_engine_id_04c8f470_fk_workflow_;
ALTER TABLE ONLY public.workflow_workflowinstance DROP CONSTRAINT workflow_workflowins_workflow_engine_id_1e6ac40f_fk_workflow_;
ALTER TABLE ONLY public.workflow_workflowinstance DROP CONSTRAINT workflow_workflowins_employee_id_c7cff08e_fk_personnel;
ALTER TABLE ONLY public.workflow_workflowengine_employee DROP CONSTRAINT workflow_workfloweng_workflowengine_id_6ebcc5f2_fk_workflow_;
ALTER TABLE ONLY public.workflow_workflowengine_employee DROP CONSTRAINT workflow_workfloweng_employee_id_803a409e_fk_personnel;
ALTER TABLE ONLY public.workflow_workflowengine DROP CONSTRAINT workflow_workfloweng_departments_id_0f06d4c7_fk_personnel;
ALTER TABLE ONLY public.workflow_workflowengine DROP CONSTRAINT workflow_workfloweng_content_type_id_f7345c20_fk_django_co;
ALTER TABLE ONLY public.workflow_workflowengine DROP CONSTRAINT workflow_workfloweng_applicant_position_i_8a65e03a_fk_personnel;
ALTER TABLE ONLY public.workflow_nodeinstance DROP CONSTRAINT workflow_nodeinstanc_workflow_node_id_166f36c4_fk_workflow_;
ALTER TABLE ONLY public.workflow_nodeinstance DROP CONSTRAINT workflow_nodeinstanc_workflow_instance_id_afe84fe4_fk_workflow_;
ALTER TABLE ONLY public.workflow_nodeinstance DROP CONSTRAINT workflow_nodeinstanc_approver_employee_id_d36cd45d_fk_personnel;
ALTER TABLE ONLY public.visitor_visitortransaction DROP CONSTRAINT visitor_visitortrans_visitor_id_0ee95624_fk_visitor_v;
ALTER TABLE ONLY public.visitor_visitortransaction DROP CONSTRAINT visitor_visitortrans_terminal_id_7527ef69_fk_iclock_te;
ALTER TABLE ONLY public.visitor_visitorlog DROP CONSTRAINT visitor_visitorlog_visitor_id_ebaafde1_fk_visitor_visitor_id;
ALTER TABLE ONLY public.visitor_visitorbiophoto DROP CONSTRAINT visitor_visitorbioph_visitor_id_9816daf7_fk_visitor_v;
ALTER TABLE ONLY public.visitor_visitorbiodata DROP CONSTRAINT visitor_visitorbioda_visitor_id_b944ed37_fk_visitor_v;
ALTER TABLE ONLY public.visitor_visitor DROP CONSTRAINT visitor_visitor_visited_id_8043a7ea_fk_personnel_employee_id;
ALTER TABLE ONLY public.visitor_visitor DROP CONSTRAINT visitor_visitor_visit_reason_id_4b9a2d23_fk_visitor_reason_id;
ALTER TABLE ONLY public.visitor_visitor DROP CONSTRAINT visitor_visitor_visit_department_id_f7dbdcb4_fk_personnel;
ALTER TABLE ONLY public.visitor_visitor DROP CONSTRAINT visitor_visitor_cert_type_id_f62ea604_fk_personnel;
ALTER TABLE ONLY public.visitor_visitor_area DROP CONSTRAINT visitor_visitor_area_visitor_id_98d7ed05_fk_visitor_visitor_id;
ALTER TABLE ONLY public.visitor_visitor_area DROP CONSTRAINT visitor_visitor_area_area_id_b402c047_fk_personnel_area_id;
ALTER TABLE ONLY public.visitor_visitor_acc_groups DROP CONSTRAINT visitor_visitor_acc__visitor_id_8ce09562_fk_visitor_v;
ALTER TABLE ONLY public.visitor_visitor_acc_groups DROP CONSTRAINT visitor_visitor_acc__accgroups_id_b1487149_fk_acc_accgr;
ALTER TABLE ONLY public.visitor_reservation DROP CONSTRAINT visitor_reservation_workflowinstance_ptr_3787bcd6_fk_workflow_;
ALTER TABLE ONLY public.visitor_reservation DROP CONSTRAINT visitor_reservation_visit_reason_id_c9ac83ac_fk_visitor_r;
ALTER TABLE ONLY public.visitor_reservation DROP CONSTRAINT visitor_reservation_visit_department_id_2d293e10_fk_personnel;
ALTER TABLE ONLY public.visitor_reservation DROP CONSTRAINT visitor_reservation_cert_type_id_4f047f2a_fk_personnel;
ALTER TABLE ONLY public.staff_stafftoken DROP CONSTRAINT staff_stafftoken_user_id_39c937fa_fk_personnel_employee_id;
ALTER TABLE ONLY public.rest_framework_tracking_apirequestlog DROP CONSTRAINT rest_framework_track_user_id_671b70b7_fk_auth_user;
ALTER TABLE ONLY public.personnel_resign DROP CONSTRAINT personnel_resign_employee_id_dd9b7e08_fk_personnel_employee_id;
ALTER TABLE ONLY public.personnel_position DROP CONSTRAINT personnel_position_parent_position_id_a496a36b_fk_personnel;
ALTER TABLE ONLY public.personnel_position DROP CONSTRAINT personnel_position_company_id_f06c5d2a_fk_personnel_company_id;
ALTER TABLE ONLY public.personnel_employment DROP CONSTRAINT personnel_employment_employee_id_f797c7d9_fk_personnel;
ALTER TABLE ONLY public.personnel_employeeprofile DROP CONSTRAINT personnel_employeepr_emp_id_3a69c313_fk_personnel;
ALTER TABLE ONLY public.personnel_employeeextrainfo DROP CONSTRAINT personnel_employeeex_employee_id_41e2b04d_fk_personnel;
ALTER TABLE ONLY public.personnel_employeecertification DROP CONSTRAINT personnel_employeece_employee_id_b7bd3867_fk_personnel;
ALTER TABLE ONLY public.personnel_employeecertification DROP CONSTRAINT personnel_employeece_certification_id_faabed40_fk_personnel;
ALTER TABLE ONLY public.personnel_employeecalendar DROP CONSTRAINT personnel_employeeca_employee_id_165e0779_fk_personnel;
ALTER TABLE ONLY public.personnel_employee DROP CONSTRAINT personnel_employee_superior_id_ad6e1c47_fk_personnel;
ALTER TABLE ONLY public.personnel_employee DROP CONSTRAINT personnel_employee_position_id_c9321343_fk_personnel;
ALTER TABLE ONLY public.personnel_employee_flow_role DROP CONSTRAINT personnel_employee_f_workflowrole_id_4704db32_fk_workflow_;
ALTER TABLE ONLY public.personnel_employee_flow_role DROP CONSTRAINT personnel_employee_f_employee_id_c27f8a56_fk_personnel;
ALTER TABLE ONLY public.personnel_employee DROP CONSTRAINT personnel_employee_department_id_068bbd08_fk_personnel;
ALTER TABLE ONLY public.personnel_employee DROP CONSTRAINT personnel_employee_company_id_95b3fd72_fk_personnel_company_id;
ALTER TABLE ONLY public.personnel_employee_area DROP CONSTRAINT personnel_employee_area_area_id_64c21925_fk_personnel_area_id;
ALTER TABLE ONLY public.personnel_employee_area DROP CONSTRAINT personnel_employee_a_employee_id_8e5cec21_fk_personnel;
ALTER TABLE ONLY public.personnel_department DROP CONSTRAINT personnel_department_parent_dept_id_d0b44024_fk_personnel;
ALTER TABLE ONLY public.personnel_department DROP CONSTRAINT personnel_department_dept_manager_id_c5124a7d_fk_personnel;
ALTER TABLE ONLY public.personnel_department DROP CONSTRAINT personnel_department_company_id_00867fd8_fk_personnel;
ALTER TABLE ONLY public.personnel_assignareaemployee DROP CONSTRAINT personnel_assignarea_employee_id_a3d4dd25_fk_personnel;
ALTER TABLE ONLY public.personnel_assignareaemployee DROP CONSTRAINT personnel_assignarea_area_id_6f049d6a_fk_personnel;
ALTER TABLE ONLY public.personnel_area DROP CONSTRAINT personnel_area_parent_area_id_39028fda_fk_personnel_area_id;
ALTER TABLE ONLY public.personnel_area DROP CONSTRAINT personnel_area_company_id_59750eb5_fk_personnel_company_id;
ALTER TABLE ONLY public.payroll_salarystructure_leaveformula DROP CONSTRAINT payroll_salarystruct_salarystructure_id_cf98fdd7_fk_payroll_s;
ALTER TABLE ONLY public.payroll_salarystructure_increasementformula DROP CONSTRAINT payroll_salarystruct_salarystructure_id_8752401c_fk_payroll_s;
ALTER TABLE ONLY public.payroll_salarystructure_overtimeformula DROP CONSTRAINT payroll_salarystruct_salarystructure_id_64f75042_fk_payroll_s;
ALTER TABLE ONLY public.payroll_salarystructure_deductionformula DROP CONSTRAINT payroll_salarystruct_salarystructure_id_5ca7cdb5_fk_payroll_s;
ALTER TABLE ONLY public.payroll_salarystructure_exceptionformula DROP CONSTRAINT payroll_salarystruct_salarystructure_id_3c087208_fk_payroll_s;
ALTER TABLE ONLY public.payroll_salarystructure_overtimeformula DROP CONSTRAINT payroll_salarystruct_overtimeformula_id_40ad89ef_fk_payroll_o;
ALTER TABLE ONLY public.payroll_salarystructure_leaveformula DROP CONSTRAINT payroll_salarystruct_leaveformula_id_049f9024_fk_payroll_l;
ALTER TABLE ONLY public.payroll_salarystructure_increasementformula DROP CONSTRAINT payroll_salarystruct_increasementformula__3cd77082_fk_payroll_i;
ALTER TABLE ONLY public.payroll_salarystructure_exceptionformula DROP CONSTRAINT payroll_salarystruct_exceptionformula_id_8f6dadb3_fk_payroll_e;
ALTER TABLE ONLY public.payroll_salarystructure DROP CONSTRAINT payroll_salarystruct_employee_id_98996e15_fk_personnel;
ALTER TABLE ONLY public.payroll_salarystructure_deductionformula DROP CONSTRAINT payroll_salarystruct_deductionformula_id_b174d5b6_fk_payroll_d;
ALTER TABLE ONLY public.payroll_salaryadvance DROP CONSTRAINT payroll_salaryadvanc_employee_id_2abd43e5_fk_personnel;
ALTER TABLE ONLY public.payroll_reimbursement DROP CONSTRAINT payroll_reimbursemen_employee_id_c4bbde36_fk_personnel;
ALTER TABLE ONLY public.payroll_payrollpayloadpaycode DROP CONSTRAINT payroll_payrollpaylo_payload_id_f085c4e8_fk_payroll_p;
ALTER TABLE ONLY public.payroll_payrollpayloadpaycode DROP CONSTRAINT payroll_payrollpaylo_pay_code_id_c057af1f_fk_att_payco;
ALTER TABLE ONLY public.payroll_payrollpayload DROP CONSTRAINT payroll_payrollpaylo_employee_id_bc868f2b_fk_personnel;
ALTER TABLE ONLY public.payroll_overtimeformula DROP CONSTRAINT payroll_overtimeformula_pay_code_id_36d2f10e_fk_att_paycode_id;
ALTER TABLE ONLY public.payroll_leaveformula DROP CONSTRAINT payroll_leaveformula_pay_code_id_63c7b4bd_fk_att_paycode_id;
ALTER TABLE ONLY public.payroll_extraincrease DROP CONSTRAINT payroll_extraincreas_employee_id_f902e6bb_fk_personnel;
ALTER TABLE ONLY public.payroll_extradeduction DROP CONSTRAINT payroll_extradeducti_employee_id_53072441_fk_personnel;
ALTER TABLE ONLY public.payroll_exceptionformula DROP CONSTRAINT payroll_exceptionformula_pay_code_id_97609b51_fk_att_paycode_id;
ALTER TABLE ONLY public.payroll_emppayrollprofile DROP CONSTRAINT payroll_emppayrollpr_employee_id_6c97078c_fk_personnel;
ALTER TABLE ONLY public.payroll_emploan DROP CONSTRAINT payroll_emploan_employee_id_97a251ef_fk_personnel_employee_id;
ALTER TABLE ONLY public.mobile_mobileapirequestlog DROP CONSTRAINT mobile_mobileapirequ_user_id_dfd3ded1_fk_personnel;
ALTER TABLE ONLY public.mobile_gpsforemployee_location DROP CONSTRAINT mobile_gpsforemploye_gpslocation_id_497a214f_fk_mobile_gp;
ALTER TABLE ONLY public.mobile_gpsforemployee_location DROP CONSTRAINT mobile_gpsforemploye_gpsforemployee_id_a52023d5_fk_mobile_gp;
ALTER TABLE ONLY public.mobile_gpsforemployee DROP CONSTRAINT mobile_gpsforemploye_employee_id_982b7cef_fk_personnel;
ALTER TABLE ONLY public.mobile_gpsfordepartment_location DROP CONSTRAINT mobile_gpsfordepartm_gpslocation_id_48b82e9e_fk_mobile_gp;
ALTER TABLE ONLY public.mobile_gpsfordepartment_location DROP CONSTRAINT mobile_gpsfordepartm_gpsfordepartment_id_23e9af3a_fk_mobile_gp;
ALTER TABLE ONLY public.mobile_gpsfordepartment DROP CONSTRAINT mobile_gpsfordepartm_department_id_988ccf22_fk_personnel;
ALTER TABLE ONLY public.mobile_appnotification DROP CONSTRAINT mobile_appnotification_admin_id_29c27197_fk_auth_user_id;
ALTER TABLE ONLY public.mobile_appnotification DROP CONSTRAINT mobile_appnotificati_receiver_id_90c4a355_fk_personnel;
ALTER TABLE ONLY public.mobile_appnotification DROP CONSTRAINT mobile_appnotificati_init_sender_id_d8aff845_fk_personnel;
ALTER TABLE ONLY public.mobile_announcement DROP CONSTRAINT mobile_announcement_receiver_id_ddf2a860_fk_personnel;
ALTER TABLE ONLY public.mobile_announcement DROP CONSTRAINT mobile_announcement_init_sender_id_2f5e35bd_fk_personnel;
ALTER TABLE ONLY public.mobile_announcement DROP CONSTRAINT mobile_announcement_admin_id_6af3868c_fk_auth_user_id;
ALTER TABLE ONLY public.meeting_meetingtransaction DROP CONSTRAINT meeting_meetingtrans_terminal_id_047426f2_fk_iclock_te;
ALTER TABLE ONLY public.meeting_meetingtransaction DROP CONSTRAINT meeting_meetingtrans_meeting_id_e4e505e5_fk_meeting_m;
ALTER TABLE ONLY public.meeting_meetingtransaction DROP CONSTRAINT meeting_meetingtrans_emp_id_fbcdd686_fk_personnel;
ALTER TABLE ONLY public.meeting_meetingroomdevice DROP CONSTRAINT meeting_meetingroomd_room_id_e000d78d_fk_meeting_m;
ALTER TABLE ONLY public.meeting_meetingroomdevice DROP CONSTRAINT meeting_meetingroomd_device_id_a09e8a7d_fk_iclock_te;
ALTER TABLE ONLY public.meeting_meetingpayloadbase DROP CONSTRAINT meeting_meetingpaylo_meeting_id_ca9d20cc_fk_meeting_m;
ALTER TABLE ONLY public.meeting_meetingpayloadbase DROP CONSTRAINT meeting_meetingpaylo_emp_id_ed6ec148_fk_personnel;
ALTER TABLE ONLY public.meeting_meetingmanuallog DROP CONSTRAINT meeting_meetingmanua_workflowinstance_ptr_bd514862_fk_workflow_;
ALTER TABLE ONLY public.meeting_meetingmanuallog DROP CONSTRAINT meeting_meetingmanua_meeting_id_a672eaaf_fk_meeting_m;
ALTER TABLE ONLY public.meeting_meetingentity DROP CONSTRAINT meeting_meetingentit_workflowinstance_ptr_dbd9ab40_fk_workflow_;
ALTER TABLE ONLY public.meeting_meetingentity DROP CONSTRAINT meeting_meetingentit_room_id_bc2c738e_fk_meeting_m;
ALTER TABLE ONLY public.meeting_meetingentity_attender DROP CONSTRAINT meeting_meetingentit_meetingentity_id_b96dbc7d_fk_meeting_m;
ALTER TABLE ONLY public.meeting_meetingentity_attender DROP CONSTRAINT meeting_meetingentit_employee_id_ee898064_fk_personnel;
ALTER TABLE ONLY public.iclock_transactionproofcmd DROP CONSTRAINT iclock_transactionpr_terminal_id_08b81e1e_fk_iclock_te;
ALTER TABLE ONLY public.iclock_transaction DROP CONSTRAINT iclock_transaction_terminal_id_451c81c2_fk_iclock_terminal_id;
ALTER TABLE ONLY public.iclock_transaction DROP CONSTRAINT iclock_transaction_emp_id_60fa3521_fk_personnel_employee_id;
ALTER TABLE ONLY public.iclock_terminalworkcode DROP CONSTRAINT iclock_terminalworkc_company_id_77625f26_fk_personnel;
ALTER TABLE ONLY public.iclock_terminaluploadlog DROP CONSTRAINT iclock_terminaluploa_terminal_id_9c9a7664_fk_iclock_te;
ALTER TABLE ONLY public.iclock_terminalparameter DROP CONSTRAINT iclock_terminalparam_terminal_id_443872e3_fk_iclock_te;
ALTER TABLE ONLY public.iclock_terminallog DROP CONSTRAINT iclock_terminallog_terminal_id_667b3ea7_fk_iclock_terminal_id;
ALTER TABLE ONLY public.iclock_terminalcommand DROP CONSTRAINT iclock_terminalcomma_terminal_id_3dcf836f_fk_iclock_te;
ALTER TABLE ONLY public.iclock_terminalcommandlog DROP CONSTRAINT iclock_terminalcomma_terminal_id_35ea8b2b_fk_iclock_te;
ALTER TABLE ONLY public.iclock_terminal DROP CONSTRAINT iclock_terminal_area_id_c019c6f0_fk_personnel_area_id;
ALTER TABLE ONLY public.iclock_publicmessage DROP CONSTRAINT iclock_publicmessage_terminal_id_c3b5e4cf_fk_iclock_terminal_id;
ALTER TABLE ONLY public.iclock_publicmessage DROP CONSTRAINT iclock_publicmessage_message_id_7d125e28_fk_iclock_sh;
ALTER TABLE ONLY public.iclock_privatemessage DROP CONSTRAINT iclock_privatemessag_message_id_e3145d3b_fk_iclock_sh;
ALTER TABLE ONLY public.iclock_privatemessage DROP CONSTRAINT iclock_privatemessag_employee_id_e84a34c0_fk_personnel;
ALTER TABLE ONLY public.iclock_errorcommandlog DROP CONSTRAINT iclock_errorcommandl_terminal_id_3b2d7cbd_fk_iclock_te;
ALTER TABLE ONLY public.iclock_biophoto DROP CONSTRAINT iclock_biophoto_employee_id_3dba5819_fk_personnel_employee_id;
ALTER TABLE ONLY public.iclock_biodata DROP CONSTRAINT iclock_biodata_employee_id_ff748ea7_fk_personnel_employee_id;
ALTER TABLE ONLY public.guardian_userobjectpermission DROP CONSTRAINT guardian_userobjectpermission_user_id_d5c1e964_fk_auth_user_id;
ALTER TABLE ONLY public.guardian_userobjectpermission DROP CONSTRAINT guardian_userobjectp_permission_id_71807bfc_fk_auth_perm;
ALTER TABLE ONLY public.guardian_userobjectpermission DROP CONSTRAINT guardian_userobjectp_content_type_id_2e892405_fk_django_co;
ALTER TABLE ONLY public.guardian_groupobjectpermission DROP CONSTRAINT guardian_groupobject_permission_id_36572738_fk_auth_perm;
ALTER TABLE ONLY public.guardian_groupobjectpermission DROP CONSTRAINT guardian_groupobject_group_id_4bbbfb62_fk_auth_grou;
ALTER TABLE ONLY public.guardian_groupobjectpermission DROP CONSTRAINT guardian_groupobject_content_type_id_7ade36b8_fk_django_co;
ALTER TABLE ONLY public.ep_eptransaction DROP CONSTRAINT ep_eptransaction_terminal_id_4490b209_fk_iclock_terminal_id;
ALTER TABLE ONLY public.ep_eptransaction DROP CONSTRAINT ep_eptransaction_emp_id_1006883f_fk_personnel_employee_id;
ALTER TABLE ONLY public.django_celery_beat_periodictask DROP CONSTRAINT django_celery_beat_p_solar_id_a87ce72c_fk_django_ce;
ALTER TABLE ONLY public.django_celery_beat_periodictask DROP CONSTRAINT django_celery_beat_p_interval_id_a8ca27da_fk_django_ce;
ALTER TABLE ONLY public.django_celery_beat_periodictask DROP CONSTRAINT django_celery_beat_p_crontab_id_d3cba168_fk_django_ce;
ALTER TABLE ONLY public.django_celery_beat_periodictask DROP CONSTRAINT django_celery_beat_p_clocked_id_47a69f82_fk_django_ce;
ALTER TABLE ONLY public.django_admin_log DROP CONSTRAINT django_admin_log_user_id_c564eba6_fk_auth_user_id;
ALTER TABLE ONLY public.django_admin_log DROP CONSTRAINT django_admin_log_content_type_id_c4bce8eb_fk_django_co;
ALTER TABLE ONLY public.base_linenotifysetting DROP CONSTRAINT base_linenotifysetti_line_notify_dept_id_0643a5ed_fk_personnel;
ALTER TABLE ONLY public.base_bookmark DROP CONSTRAINT base_bookmark_user_id_5f2d5ca2_fk_auth_user_id;
ALTER TABLE ONLY public.base_bookmark DROP CONSTRAINT base_bookmark_content_type_id_b6a0e799_fk_django_co;
ALTER TABLE ONLY public.base_autoimporttask DROP CONSTRAINT base_autoimporttask_company_id_d18431a1_fk_personnel_company_id;
ALTER TABLE ONLY public.base_adminlog DROP CONSTRAINT base_adminlog_user_id_ecf659f8_fk_auth_user_id;
ALTER TABLE ONLY public.base_adminlog DROP CONSTRAINT base_adminlog_content_type_id_3e553c30_fk_django_co;
ALTER TABLE ONLY public.authtoken_token DROP CONSTRAINT authtoken_token_user_id_35299eff_fk_auth_user_id;
ALTER TABLE ONLY public.auth_user_user_permissions DROP CONSTRAINT auth_user_user_permissions_myuser_id_679b1527_fk_auth_user_id;
ALTER TABLE ONLY public.auth_user_user_permissions DROP CONSTRAINT auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm;
ALTER TABLE ONLY public.auth_user_profile DROP CONSTRAINT auth_user_profile_user_id_f9aded29_fk_auth_user_id;
ALTER TABLE ONLY public.auth_user_groups DROP CONSTRAINT auth_user_groups_myuser_id_d03e8dcc_fk_auth_user_id;
ALTER TABLE ONLY public.auth_user_groups DROP CONSTRAINT auth_user_groups_group_id_97559544_fk_auth_group_id;
ALTER TABLE ONLY public.auth_user_auth_dept DROP CONSTRAINT auth_user_auth_dept_myuser_id_18a51b27_fk_auth_user_id;
ALTER TABLE ONLY public.auth_user_auth_dept DROP CONSTRAINT auth_user_auth_dept_department_id_5866c514_fk_personnel;
ALTER TABLE ONLY public.auth_user_auth_area DROP CONSTRAINT auth_user_auth_area_myuser_id_5fb9a803_fk_auth_user_id;
ALTER TABLE ONLY public.auth_user_auth_area DROP CONSTRAINT auth_user_auth_area_area_id_d1e54c70_fk_personnel_area_id;
ALTER TABLE ONLY public.auth_permission DROP CONSTRAINT auth_permission_content_type_id_2f476e4b_fk_django_co;
ALTER TABLE ONLY public.auth_group_permissions DROP CONSTRAINT auth_group_permissions_group_id_b120cbf9_fk_auth_group_id;
ALTER TABLE ONLY public.auth_group_permissions DROP CONSTRAINT auth_group_permissio_permission_id_84c5c92e_fk_auth_perm;
ALTER TABLE ONLY public.att_webpunch DROP CONSTRAINT att_webpunch_workflowinstance_ptr_c5f1c02e_fk_workflow_;
ALTER TABLE ONLY public.att_training DROP CONSTRAINT att_training_workflowinstance_ptr_0aef1508_fk_workflow_;
ALTER TABLE ONLY public.att_training DROP CONSTRAINT att_training_pay_code_id_5790afdd_fk_att_paycode_id;
ALTER TABLE ONLY public.att_timeinterval DROP CONSTRAINT att_timeinterval_ot_pay_code_id_17438af8_fk_att_paycode_id;
ALTER TABLE ONLY public.att_timeinterval_break_time DROP CONSTRAINT att_timeinterval_bre_timeinterval_id_2287017e_fk_att_timei;
ALTER TABLE ONLY public.att_timeinterval_break_time DROP CONSTRAINT att_timeinterval_bre_breaktime_id_08462308_fk_att_break;
ALTER TABLE ONLY public.att_tempschedule DROP CONSTRAINT att_tempschedule_employee_id_b89c7e54_fk_personnel_employee_id;
ALTER TABLE ONLY public.att_temporaryschedule DROP CONSTRAINT att_temporaryschedul_employee_id_2b2b94c2_fk_personnel;
ALTER TABLE ONLY public.att_shiftdetail DROP CONSTRAINT att_shiftdetail_time_interval_id_777dde8f_fk_att_timei;
ALTER TABLE ONLY public.att_shiftdetail DROP CONSTRAINT att_shiftdetail_shift_id_7d694501_fk_att_attshift_id;
ALTER TABLE ONLY public.att_reporttemplate DROP CONSTRAINT att_reporttemplate_employee_id_4f80d866_fk_personnel;
ALTER TABLE ONLY public.att_reporttemplate DROP CONSTRAINT att_reporttemplate_builder_id_e1bb15c6_fk_auth_user_id;
ALTER TABLE ONLY public.att_payloadtimecard DROP CONSTRAINT att_payloadtimecard_time_table_id_6e0b0137_fk_att_timei;
ALTER TABLE ONLY public.att_payloadtimecard DROP CONSTRAINT att_payloadtimecard_emp_id_47caeab4_fk_personnel_employee_id;
ALTER TABLE ONLY public.att_payloadpunch DROP CONSTRAINT att_payloadpunch_orig_id_16b26416_fk_iclock_transaction_id;
ALTER TABLE ONLY public.att_payloadpunch DROP CONSTRAINT att_payloadpunch_emp_id_053da2f0_fk_personnel_employee_id;
ALTER TABLE ONLY public.att_payloadpaycode DROP CONSTRAINT att_payloadpaycode_shift_id_79a0901e_fk_att_attshift_id;
ALTER TABLE ONLY public.att_payloadpaycode DROP CONSTRAINT att_payloadpaycode_pay_code_id_4a096cc7_fk_att_paycode_id;
ALTER TABLE ONLY public.att_payloadpaycode DROP CONSTRAINT att_payloadpaycode_emp_id_78e75279_fk_personnel_employee_id;
ALTER TABLE ONLY public.att_payloadparing DROP CONSTRAINT att_payloadparing_pay_code_id_aa241cca_fk_att_paycode_id;
ALTER TABLE ONLY public.att_payloadparing DROP CONSTRAINT att_payloadparing_out_trans_id_8b2375b9_fk_iclock_tr;
ALTER TABLE ONLY public.att_payloadparing DROP CONSTRAINT att_payloadparing_in_trans_id_50a8040e_fk_iclock_transaction_id;
ALTER TABLE ONLY public.att_payloadparing DROP CONSTRAINT att_payloadparing_emp_id_c5daac4f_fk_personnel_employee_id;
ALTER TABLE ONLY public.att_payloadmulpunchset DROP CONSTRAINT att_payloadmulpunchset_emp_id_f47610c8_fk_personnel_employee_id;
ALTER TABLE ONLY public.att_payloadexception DROP CONSTRAINT att_payloadexception_item_id_a08bfe48_fk_att_leave;
ALTER TABLE ONLY public.att_payloadeffectpunch DROP CONSTRAINT att_payloadeffectpunch_emp_id_67e28e01_fk_personnel_employee_id;
ALTER TABLE ONLY public.att_payloadeffectpunch DROP CONSTRAINT att_payloadeffectpun_trans_id_94affbe6_fk_iclock_tr;
ALTER TABLE ONLY public.att_payloadbase DROP CONSTRAINT att_payloadbase_timetable_id_a389e3d8_fk_att_timeinterval_id;
ALTER TABLE ONLY public.att_payloadbase DROP CONSTRAINT att_payloadbase_emp_id_2c0f6a7b_fk_personnel_employee_id;
ALTER TABLE ONLY public.att_payloadattcode DROP CONSTRAINT att_payloadattcode_shift_id_731faddf_fk_att_attshift_id;
ALTER TABLE ONLY public.att_payloadattcode DROP CONSTRAINT att_payloadattcode_emp_id_36569f54_fk_personnel_employee_id;
ALTER TABLE ONLY public.att_payloadattcode DROP CONSTRAINT att_payloadattcode_att_code_id_0d635efd_fk_att_attcode_id;
ALTER TABLE ONLY public.att_overtimepolicy DROP CONSTRAINT att_overtimepolicy_pay_code_id_285b0a61_fk_att_paycode_id;
ALTER TABLE ONLY public.att_overtimepolicy DROP CONSTRAINT att_overtimepolicy_overnight_pay_code_i_274ce1b0_fk_att_payco;
ALTER TABLE ONLY public.att_overtime DROP CONSTRAINT att_overtime_workflowinstance_ptr_6bd6a6f4_fk_workflow_;
ALTER TABLE ONLY public.att_overtime DROP CONSTRAINT att_overtime_pay_code_id_05600ee0_fk_att_paycode_id;
ALTER TABLE ONLY public.att_manuallog DROP CONSTRAINT att_manuallog_workflowinstance_ptr_22a3fbd0_fk_workflow_;
ALTER TABLE ONLY public.att_leaveyearbalance DROP CONSTRAINT att_leaveyearbalance_pay_code_id_82632aca_fk_att_paycode_id;
ALTER TABLE ONLY public.att_leaveyearbalance DROP CONSTRAINT att_leaveyearbalance_employee_id_14febdb3_fk_personnel;
ALTER TABLE ONLY public.att_leavegroupdetail DROP CONSTRAINT att_leavegroupdetail_pay_code_id_5013b373_fk_att_paycode_id;
ALTER TABLE ONLY public.att_leavegroupdetail DROP CONSTRAINT att_leavegroupdetail_leave_group_id_28f69ada_fk_att_leave;
ALTER TABLE ONLY public.att_leave DROP CONSTRAINT att_leave_workflowinstance_ptr_39aaa9d9_fk_workflow_;
ALTER TABLE ONLY public.att_leave DROP CONSTRAINT att_leave_pay_code_id_2fadf493_fk_att_paycode_id;
ALTER TABLE ONLY public.att_holiday DROP CONSTRAINT att_holiday_department_id_fbbbd185_fk_personnel_department_id;
ALTER TABLE ONLY public.att_holiday DROP CONSTRAINT att_holiday_att_group_id_9ddf13ba_fk_att_attgroup_id;
ALTER TABLE ONLY public.att_groupschedule DROP CONSTRAINT att_groupschedule_shift_id_287e7fc0_fk_att_attshift_id;
ALTER TABLE ONLY public.att_groupschedule DROP CONSTRAINT att_groupschedule_group_id_c341493f_fk_att_attgroup_id;
ALTER TABLE ONLY public.att_grouppolicy DROP CONSTRAINT att_grouppolicy_ot_pay_code_id_1ec83080_fk_att_paycode_id;
ALTER TABLE ONLY public.att_grouppolicy DROP CONSTRAINT att_grouppolicy_group_id_b2e4dfe8_fk_att_attgroup_id;
ALTER TABLE ONLY public.att_deptattrule DROP CONSTRAINT att_deptattrule_department_id_f333c8f0_fk_personnel;
ALTER TABLE ONLY public.att_departmentschedule DROP CONSTRAINT att_departmentschedule_shift_id_c37d5ade_fk_att_attshift_id;
ALTER TABLE ONLY public.att_departmentschedule DROP CONSTRAINT att_departmentschedu_department_id_c68fca3d_fk_personnel;
ALTER TABLE ONLY public.att_departmentpolicy DROP CONSTRAINT att_departmentpolicy_ot_pay_code_id_390411dd_fk_att_paycode_id;
ALTER TABLE ONLY public.att_departmentpolicy DROP CONSTRAINT att_departmentpolicy_department_id_77059a9d_fk_personnel;
ALTER TABLE ONLY public.att_changeschedule DROP CONSTRAINT att_changeschedule_workflowinstance_ptr_cee602bb_fk_workflow_;
ALTER TABLE ONLY public.att_changeschedule DROP CONSTRAINT att_changeschedule_timeinterval_id_d41ac077_fk_att_timei;
ALTER TABLE ONLY public.att_breaktime DROP CONSTRAINT att_breaktime_profit_code_id_63cdbbcc_fk_att_paycode_id;
ALTER TABLE ONLY public.att_breaktime DROP CONSTRAINT att_breaktime_loss_code_id_2ffb5432_fk_att_paycode_id;
ALTER TABLE ONLY public.att_attschedule DROP CONSTRAINT att_attschedule_shift_id_13d2db9a_fk_att_attshift_id;
ALTER TABLE ONLY public.att_attschedule DROP CONSTRAINT att_attschedule_employee_id_caa61686_fk_personnel_employee_id;
ALTER TABLE ONLY public.att_attpolicy DROP CONSTRAINT att_attpolicy_ot_pay_code_id_b189b952_fk_att_paycode_id;
ALTER TABLE ONLY public.att_attemployee DROP CONSTRAINT att_attemployee_group_id_18d3954d_fk_att_attgroup_id;
ALTER TABLE ONLY public.att_attemployee DROP CONSTRAINT att_attemployee_emp_id_52457e3c_fk_personnel_employee_id;
ALTER TABLE ONLY public.accounts_usernotification DROP CONSTRAINT accounts_usernotification_user_id_b86755b3_fk_auth_user_id;
ALTER TABLE ONLY public.accounts_adminbiodata DROP CONSTRAINT accounts_adminbiodata_admin_id_1e6d2d45_fk_auth_user_id;
ALTER TABLE ONLY public.acc_acctimezone DROP CONSTRAINT acc_acctimezone_area_id_e9ce7a7a_fk_personnel_area_id;
ALTER TABLE ONLY public.acc_accterminal DROP CONSTRAINT acc_accterminal_terminal_id_fc92cce2_fk_iclock_terminal_id;
ALTER TABLE ONLY public.acc_accprivilege DROP CONSTRAINT acc_accprivilege_group_id_c5ed7003_fk_acc_accgroups_id;
ALTER TABLE ONLY public.acc_accprivilege DROP CONSTRAINT acc_accprivilege_employee_id_5fc55f95_fk_personnel_employee_id;
ALTER TABLE ONLY public.acc_accprivilege DROP CONSTRAINT acc_accprivilege_area_id_2123ff6f_fk_personnel_area_id;
ALTER TABLE ONLY public.acc_accholiday DROP CONSTRAINT acc_accholiday_timezone_id_450d2d1e_fk_acc_acctimezone_id;
ALTER TABLE ONLY public.acc_accholiday DROP CONSTRAINT acc_accholiday_holiday_id_a9efe924_fk_att_holiday_id;
ALTER TABLE ONLY public.acc_accholiday DROP CONSTRAINT acc_accholiday_area_id_d15c19da_fk_personnel_area_id;
ALTER TABLE ONLY public.acc_accgroups DROP CONSTRAINT acc_accgroups_area_id_b83745c3_fk_personnel_area_id;
ALTER TABLE ONLY public.acc_acccombination DROP CONSTRAINT acc_acccombination_area_id_0d22c34e_fk_personnel_area_id;
DROP INDEX public.workflow_workflowrole_role_name_5e0a9215_like;
DROP INDEX public.workflow_workflowrole_role_code_e2e9edb9_like;
DROP INDEX public.workflow_workflownode_workflow_engine_id_04c8f470;
DROP INDEX public.workflow_workflownode_notifier_workflowrole_id_73de7fc2;
DROP INDEX public.workflow_workflownode_notifier_workflownode_id_57298016;
DROP INDEX public.workflow_workflownode_approver_workflowrole_id_c8e00d42;
DROP INDEX public.workflow_workflownode_approver_workflownode_id_d814c941;
DROP INDEX public.workflow_workflowinstance_workflow_engine_id_1e6ac40f;
DROP INDEX public.workflow_workflowinstance_employee_id_c7cff08e;
DROP INDEX public.workflow_workflowengine_workflow_code_86134f98_like;
DROP INDEX public.workflow_workflowengine_employee_workflowengine_id_6ebcc5f2;
DROP INDEX public.workflow_workflowengine_employee_employee_id_803a409e;
DROP INDEX public.workflow_workflowengine_departments_id_0f06d4c7;
DROP INDEX public.workflow_workflowengine_content_type_id_f7345c20;
DROP INDEX public.workflow_workflowengine_applicant_position_id_8a65e03a;
DROP INDEX public.workflow_nodeinstance_workflow_node_id_166f36c4;
DROP INDEX public.workflow_nodeinstance_workflow_instance_id_afe84fe4;
DROP INDEX public.workflow_nodeinstance_approver_employee_id_d36cd45d;
DROP INDEX public.visitor_visitortransaction_visitor_id_0ee95624;
DROP INDEX public.visitor_visitortransaction_terminal_id_7527ef69;
DROP INDEX public.visitor_visitorlog_visitor_id_ebaafde1;
DROP INDEX public.visitor_visitorbiophoto_visitor_id_9816daf7;
DROP INDEX public.visitor_visitorbiodata_visitor_id_b944ed37;
DROP INDEX public.visitor_visitor_visitor_code_5255ed7f_like;
DROP INDEX public.visitor_visitor_visited_id_8043a7ea;
DROP INDEX public.visitor_visitor_visit_reason_id_4b9a2d23;
DROP INDEX public.visitor_visitor_visit_department_id_f7dbdcb4;
DROP INDEX public.visitor_visitor_cert_type_id_f62ea604;
DROP INDEX public.visitor_visitor_area_visitor_id_98d7ed05;
DROP INDEX public.visitor_visitor_area_area_id_b402c047;
DROP INDEX public.visitor_visitor_acc_groups_visitor_id_8ce09562;
DROP INDEX public.visitor_visitor_acc_groups_accgroups_id_b1487149;
DROP INDEX public.visitor_reservation_visit_reason_id_c9ac83ac;
DROP INDEX public.visitor_reservation_visit_department_id_2d293e10;
DROP INDEX public.visitor_reservation_cert_type_id_4f047f2a;
DROP INDEX public.staff_stafftoken_key_af7789a4_like;
DROP INDEX public.rest_framework_tracking_apirequestlog_view_method_dd790881_like;
DROP INDEX public.rest_framework_tracking_apirequestlog_view_method_dd790881;
DROP INDEX public.rest_framework_tracking_apirequestlog_view_5bd1e407_like;
DROP INDEX public.rest_framework_tracking_apirequestlog_view_5bd1e407;
DROP INDEX public.rest_framework_tracking_apirequestlog_user_id_671b70b7;
DROP INDEX public.rest_framework_tracking_apirequestlog_status_code_3c9e2003;
DROP INDEX public.rest_framework_tracking_apirequestlog_requested_at_b6f1c2f2;
DROP INDEX public.rest_framework_tracking_apirequestlog_path_fe81f91b_like;
DROP INDEX public.rest_framework_tracking_apirequestlog_path_fe81f91b;
DROP INDEX public.personnel_position_parent_position_id_a496a36b;
DROP INDEX public.personnel_position_company_id_f06c5d2a;
DROP INDEX public.personnel_employeecustomattribute_attr_name_d286b7d5_like;
DROP INDEX public.personnel_employeecertification_employee_id_b7bd3867;
DROP INDEX public.personnel_employeecertification_certification_id_faabed40;
DROP INDEX public.personnel_employeecalendar_employee_id_165e0779;
DROP INDEX public.personnel_employee_superior_id_ad6e1c47;
DROP INDEX public.personnel_employee_position_id_c9321343;
DROP INDEX public.personnel_employee_flow_role_workflowrole_id_4704db32;
DROP INDEX public.personnel_employee_flow_role_employee_id_c27f8a56;
DROP INDEX public.personnel_employee_department_id_068bbd08;
DROP INDEX public.personnel_employee_company_id_95b3fd72;
DROP INDEX public.personnel_employee_area_employee_id_8e5cec21;
DROP INDEX public.personnel_employee_area_area_id_64c21925;
DROP INDEX public.personnel_department_parent_dept_id_d0b44024;
DROP INDEX public.personnel_department_dept_manager_id_c5124a7d;
DROP INDEX public.personnel_department_company_id_00867fd8;
DROP INDEX public.personnel_company_company_code_537dca09_like;
DROP INDEX public.personnel_certification_cert_name_67dacd72_like;
DROP INDEX public.personnel_certification_cert_code_8ba51387_like;
DROP INDEX public.personnel_assignareaemployee_employee_id_a3d4dd25;
DROP INDEX public.personnel_assignareaemployee_area_id_6f049d6a;
DROP INDEX public.personnel_area_parent_area_id_39028fda;
DROP INDEX public.personnel_area_company_id_59750eb5;
DROP INDEX public.payroll_salarystructure_ov_salarystructure_id_64f75042;
DROP INDEX public.payroll_salarystructure_ov_overtimeformula_id_40ad89ef;
DROP INDEX public.payroll_salarystructure_leaveformula_leaveformula_id_049f9024;
DROP INDEX public.payroll_salarystructure_le_salarystructure_id_cf98fdd7;
DROP INDEX public.payroll_salarystructure_in_salarystructure_id_8752401c;
DROP INDEX public.payroll_salarystructure_in_increasementformula_id_3cd77082;
DROP INDEX public.payroll_salarystructure_ex_salarystructure_id_3c087208;
DROP INDEX public.payroll_salarystructure_ex_exceptionformula_id_8f6dadb3;
DROP INDEX public.payroll_salarystructure_employee_id_98996e15;
DROP INDEX public.payroll_salarystructure_de_salarystructure_id_5ca7cdb5;
DROP INDEX public.payroll_salarystructure_de_deductionformula_id_b174d5b6;
DROP INDEX public.payroll_salaryadvance_employee_id_2abd43e5;
DROP INDEX public.payroll_reimbursement_employee_id_c4bbde36;
DROP INDEX public.payroll_payrollpayloadpaycode_payload_id_f085c4e8;
DROP INDEX public.payroll_payrollpayloadpaycode_pay_code_id_c057af1f;
DROP INDEX public.payroll_payrollpayload_employee_id_bc868f2b;
DROP INDEX public.payroll_overtimeformula_pay_code_id_36d2f10e;
DROP INDEX public.payroll_overtimeformula_name_6f2f3ff3_like;
DROP INDEX public.payroll_leaveformula_pay_code_id_63c7b4bd;
DROP INDEX public.payroll_leaveformula_name_f0ab005b_like;
DROP INDEX public.payroll_increasementformula_name_ba17a9a3_like;
DROP INDEX public.payroll_extraincrease_employee_id_f902e6bb;
DROP INDEX public.payroll_extradeduction_employee_id_53072441;
DROP INDEX public.payroll_exceptionformula_pay_code_id_97609b51;
DROP INDEX public.payroll_exceptionformula_name_e09c7463_like;
DROP INDEX public.payroll_emploan_employee_id_97a251ef;
DROP INDEX public.payroll_deductionformula_name_735ae7f7_like;
DROP INDEX public.mobile_mobileapirequestlog_view_method_2e13cf95_like;
DROP INDEX public.mobile_mobileapirequestlog_view_method_2e13cf95;
DROP INDEX public.mobile_mobileapirequestlog_view_50dbf600_like;
DROP INDEX public.mobile_mobileapirequestlog_view_50dbf600;
DROP INDEX public.mobile_mobileapirequestlog_user_id_dfd3ded1;
DROP INDEX public.mobile_mobileapirequestlog_status_code_c2de0c48;
DROP INDEX public.mobile_mobileapirequestlog_requested_at_a8c85067;
DROP INDEX public.mobile_mobileapirequestlog_path_830043b5_like;
DROP INDEX public.mobile_mobileapirequestlog_path_830043b5;
DROP INDEX public.mobile_gpsforemployee_location_gpslocation_id_497a214f;
DROP INDEX public.mobile_gpsforemployee_location_gpsforemployee_id_a52023d5;
DROP INDEX public.mobile_gpsforemployee_employee_id_982b7cef;
DROP INDEX public.mobile_gpsfordepartment_location_gpslocation_id_48b82e9e;
DROP INDEX public.mobile_gpsfordepartment_location_gpsfordepartment_id_23e9af3a;
DROP INDEX public.mobile_gpsfordepartment_department_id_988ccf22;
DROP INDEX public.mobile_appnotification_receiver_id_90c4a355;
DROP INDEX public.mobile_appnotification_init_sender_id_d8aff845;
DROP INDEX public.mobile_appnotification_admin_id_29c27197;
DROP INDEX public.mobile_announcement_receiver_id_ddf2a860;
DROP INDEX public.mobile_announcement_init_sender_id_2f5e35bd;
DROP INDEX public.mobile_announcement_admin_id_6af3868c;
DROP INDEX public.meeting_meetingtransaction_terminal_id_047426f2;
DROP INDEX public.meeting_meetingtransaction_meeting_id_e4e505e5;
DROP INDEX public.meeting_meetingtransaction_emp_id_fbcdd686;
DROP INDEX public.meeting_meetingroomdevice_room_id_e000d78d;
DROP INDEX public.meeting_meetingroom_code_c3663606_like;
DROP INDEX public.meeting_meetingpayloadbase_meeting_id_ca9d20cc;
DROP INDEX public.meeting_meetingpayloadbase_emp_id_ed6ec148;
DROP INDEX public.meeting_meetingmanuallog_meeting_id_a672eaaf;
DROP INDEX public.meeting_meetingentity_room_id_bc2c738e;
DROP INDEX public.meeting_meetingentity_code_2fe57c62_like;
DROP INDEX public.meeting_meetingentity_attender_meetingentity_id_b96dbc7d;
DROP INDEX public.meeting_meetingentity_attender_employee_id_ee898064;
DROP INDEX public.iclock_transactionproofcmd_terminal_id_08b81e1e;
DROP INDEX public.iclock_transaction_terminal_id_451c81c2;
DROP INDEX public.iclock_transaction_emp_id_60fa3521;
DROP INDEX public.iclock_terminalworkcode_company_id_77625f26;
DROP INDEX public.iclock_terminalworkcode_code_244e0245_like;
DROP INDEX public.iclock_terminaluploadlog_terminal_id_9c9a7664;
DROP INDEX public.iclock_terminalparameter_terminal_id_443872e3;
DROP INDEX public.iclock_terminallog_terminal_id_667b3ea7;
DROP INDEX public.iclock_terminalcommandlog_terminal_id_35ea8b2b;
DROP INDEX public.iclock_terminalcommand_terminal_id_3dcf836f;
DROP INDEX public.iclock_terminal_sn_209168b1_like;
DROP INDEX public.iclock_terminal_area_id_c019c6f0;
DROP INDEX public.iclock_publicmessage_terminal_id_c3b5e4cf;
DROP INDEX public.iclock_publicmessage_message_id_7d125e28;
DROP INDEX public.iclock_privatemessage_message_id_e3145d3b;
DROP INDEX public.iclock_privatemessage_employee_id_e84a34c0;
DROP INDEX public.iclock_errorcommandlog_terminal_id_3b2d7cbd;
DROP INDEX public.iclock_biophoto_employee_id_3dba5819;
DROP INDEX public.iclock_biodata_employee_id_ff748ea7;
DROP INDEX public.guardian_userobjectpermission_user_id_d5c1e964;
DROP INDEX public.guardian_userobjectpermission_permission_id_71807bfc;
DROP INDEX public.guardian_userobjectpermission_content_type_id_2e892405;
DROP INDEX public.guardian_groupobjectpermission_permission_id_36572738;
DROP INDEX public.guardian_groupobjectpermission_group_id_4bbbfb62;
DROP INDEX public.guardian_groupobjectpermission_content_type_id_7ade36b8;
DROP INDEX public.ep_eptransaction_terminal_id_4490b209;
DROP INDEX public.ep_eptransaction_emp_id_1006883f;
DROP INDEX public.django_session_session_key_c0390e0f_like;
DROP INDEX public.django_session_expire_date_a5c62663;
DROP INDEX public.django_celery_beat_periodictask_solar_id_a87ce72c;
DROP INDEX public.django_celery_beat_periodictask_name_265a36b7_like;
DROP INDEX public.django_celery_beat_periodictask_interval_id_a8ca27da;
DROP INDEX public.django_celery_beat_periodictask_crontab_id_d3cba168;
DROP INDEX public.django_celery_beat_periodictask_clocked_id_47a69f82;
DROP INDEX public.django_admin_log_user_id_c564eba6;
DROP INDEX public.django_admin_log_content_type_id_c4bce8eb;
DROP INDEX public.base_sysparamdept_rule_name_bb46d5af_like;
DROP INDEX public.base_linenotifysetting_line_notify_dept_id_0643a5ed;
DROP INDEX public.base_bookmark_user_id_5f2d5ca2;
DROP INDEX public.base_bookmark_content_type_id_b6a0e799;
DROP INDEX public.base_autoimporttask_task_code_b2760302_like;
DROP INDEX public.base_autoimporttask_company_id_d18431a1;
DROP INDEX public.base_autoexporttask_task_code_b7fa7d4e_like;
DROP INDEX public.base_autoattexporttask_task_code_88f19bac_like;
DROP INDEX public.base_attparamdepts_rulename_922e6bf3_like;
DROP INDEX public.base_adminlog_user_id_ecf659f8;
DROP INDEX public.base_adminlog_content_type_id_3e553c30;
DROP INDEX public.authtoken_token_key_10f0b77e_like;
DROP INDEX public.auth_user_username_6821ab7c_like;
DROP INDEX public.auth_user_user_permissions_permission_id_1fbb5f2c;
DROP INDEX public.auth_user_user_permissions_myuser_id_679b1527;
DROP INDEX public.auth_user_groups_myuser_id_d03e8dcc;
DROP INDEX public.auth_user_groups_group_id_97559544;
DROP INDEX public.auth_user_auth_dept_myuser_id_18a51b27;
DROP INDEX public.auth_user_auth_dept_department_id_5866c514;
DROP INDEX public.auth_user_auth_area_myuser_id_5fb9a803;
DROP INDEX public.auth_user_auth_area_area_id_d1e54c70;
DROP INDEX public.auth_permission_content_type_id_2f476e4b;
DROP INDEX public.auth_group_permissions_permission_id_84c5c92e;
DROP INDEX public.auth_group_permissions_group_id_b120cbf9;
DROP INDEX public.auth_group_name_a6ea08ec_like;
DROP INDEX public.att_training_pay_code_id_5790afdd;
DROP INDEX public.att_timeinterval_ot_pay_code_id_17438af8;
DROP INDEX public.att_timeinterval_break_time_timeinterval_id_2287017e;
DROP INDEX public.att_timeinterval_break_time_breaktime_id_08462308;
DROP INDEX public.att_timeinterval_alias_0cc89610_like;
DROP INDEX public.att_tempschedule_time_interval_id_08dd8eb3;
DROP INDEX public.att_tempschedule_employee_id_b89c7e54;
DROP INDEX public.att_temporaryschedule_time_interval_id_2be60ee4;
DROP INDEX public.att_temporaryschedule_employee_id_2b2b94c2;
DROP INDEX public.att_temporaryschedule_att_date_8aed8916;
DROP INDEX public.att_shiftdetail_time_interval_id_777dde8f;
DROP INDEX public.att_shiftdetail_shift_id_7d694501;
DROP INDEX public.att_reporttemplate_employee_id_4f80d866;
DROP INDEX public.att_reporttemplate_builder_id_e1bb15c6;
DROP INDEX public.att_reportparam_param_name_23bdf026_like;
DROP INDEX public.att_payloadtimecard_time_table_id_6e0b0137;
DROP INDEX public.att_payloadtimecard_emp_id_47caeab4;
DROP INDEX public.att_payloadtimecard_att_date_48c1dc00;
DROP INDEX public.att_payloadpunch_uuid_91e722f4_like;
DROP INDEX public.att_payloadpunch_skd_id_17596d82_like;
DROP INDEX public.att_payloadpunch_skd_id_17596d82;
DROP INDEX public.att_payloadpunch_orig_id_16b26416;
DROP INDEX public.att_payloadpunch_emp_id_053da2f0;
DROP INDEX public.att_payloadpaycode_time_card_id_1696b969;
DROP INDEX public.att_payloadpaycode_shift_id_79a0901e;
DROP INDEX public.att_payloadpaycode_pay_code_id_4a096cc7;
DROP INDEX public.att_payloadpaycode_emp_id_78e75279;
DROP INDEX public.att_payloadpaycode_att_date_aa048d7b;
DROP INDEX public.att_payloadparing_time_card_id_3adc3517;
DROP INDEX public.att_payloadparing_pay_code_id_aa241cca;
DROP INDEX public.att_payloadparing_out_trans_id_8b2375b9;
DROP INDEX public.att_payloadparing_in_trans_id_50a8040e;
DROP INDEX public.att_payloadparing_emp_id_c5daac4f;
DROP INDEX public.att_payloadparing_att_date_5daaa45d;
DROP INDEX public.att_payloadovertime_uuid_15d7782f_like;
DROP INDEX public.att_payloadmulpunchset_timetable_id_9a439a09;
DROP INDEX public.att_payloadmulpunchset_emp_id_f47610c8;
DROP INDEX public.att_payloadexception_uuid_517a81e8_like;
DROP INDEX public.att_payloadexception_skd_id_b2e9ecaa_like;
DROP INDEX public.att_payloadexception_skd_id_b2e9ecaa;
DROP INDEX public.att_payloadexception_item_id_a08bfe48;
DROP INDEX public.att_payloadeffectpunch_trans_id_94affbe6;
DROP INDEX public.att_payloadeffectpunch_time_card_id_52f69aaf;
DROP INDEX public.att_payloadeffectpunch_emp_id_67e28e01;
DROP INDEX public.att_payloadeffectpunch_att_date_1e3de2d4;
DROP INDEX public.att_payloadbreak_uuid_533ea5e2_like;
DROP INDEX public.att_payloadbase_uuid_60250467_like;
DROP INDEX public.att_payloadbase_timetable_id_a389e3d8;
DROP INDEX public.att_payloadbase_overtime_id_0e7be795_like;
DROP INDEX public.att_payloadbase_emp_id_2c0f6a7b;
DROP INDEX public.att_payloadbase_break_time_id_022d6fac_like;
DROP INDEX public.att_payloadattcode_time_card_id_e8a37c7a;
DROP INDEX public.att_payloadattcode_shift_id_731faddf;
DROP INDEX public.att_payloadattcode_emp_id_36569f54;
DROP INDEX public.att_payloadattcode_att_date_19b2621e;
DROP INDEX public.att_payloadattcode_att_code_id_0d635efd;
DROP INDEX public.att_paycode_name_6098e40c_like;
DROP INDEX public.att_paycode_code_2865d89c_like;
DROP INDEX public.att_overtimepolicy_pay_code_id_285b0a61;
DROP INDEX public.att_overtimepolicy_overnight_pay_code_id_274ce1b0;
DROP INDEX public.att_overtime_pay_code_id_05600ee0;
DROP INDEX public.att_leaveyearbalance_pay_code_id_82632aca;
DROP INDEX public.att_leaveyearbalance_employee_id_14febdb3;
DROP INDEX public.att_leavegroupdetail_pay_code_id_5013b373;
DROP INDEX public.att_leavegroupdetail_leave_group_id_28f69ada;
DROP INDEX public.att_leavegroup_name_ea482c9a_like;
DROP INDEX public.att_leavegroup_code_2043ad21_like;
DROP INDEX public.att_leave_pay_code_id_2fadf493;
DROP INDEX public.att_holiday_department_id_fbbbd185;
DROP INDEX public.att_holiday_att_group_id_9ddf13ba;
DROP INDEX public.att_groupschedule_start_date_638b6d85;
DROP INDEX public.att_groupschedule_shift_id_287e7fc0;
DROP INDEX public.att_groupschedule_group_id_c341493f;
DROP INDEX public.att_grouppolicy_ot_pay_code_id_1ec83080;
DROP INDEX public.att_grouppolicy_group_id_b2e4dfe8;
DROP INDEX public.att_deptattrule_department_id_f333c8f0;
DROP INDEX public.att_departmentschedule_shift_id_c37d5ade;
DROP INDEX public.att_departmentschedule_department_id_c68fca3d;
DROP INDEX public.att_departmentpolicy_ot_pay_code_id_390411dd;
DROP INDEX public.att_departmentpolicy_department_id_77059a9d;
DROP INDEX public.att_changeschedule_timeinterval_id_d41ac077;
DROP INDEX public.att_calculatetask_start_date_7bbaa889;
DROP INDEX public.att_calculatetask_end_date_75d1d6d2;
DROP INDEX public.att_calculatelastdate_last_date_1441abdc;
DROP INDEX public.att_breaktime_profit_code_id_63cdbbcc;
DROP INDEX public.att_breaktime_loss_code_id_2ffb5432;
DROP INDEX public.att_attschedule_shift_id_13d2db9a;
DROP INDEX public.att_attschedule_employee_id_caa61686;
DROP INDEX public.att_attrule_param_name_406bcfb6_like;
DROP INDEX public.att_attpolicy_ot_pay_code_id_b189b952;
DROP INDEX public.att_attgroup_name_7dd662e2_like;
DROP INDEX public.att_attgroup_code_e12309ae_like;
DROP INDEX public.att_attemployee_group_id_18d3954d;
DROP INDEX public.att_attcode_code_2744cfec_like;
DROP INDEX public.att_attcode_alias_51209102_like;
DROP INDEX public.accounts_usernotification_user_id_b86755b3;
DROP INDEX public.accounts_adminbiodata_admin_id_1e6d2d45;
DROP INDEX public.acc_acctimezone_area_id_e9ce7a7a;
DROP INDEX public.acc_accterminal_terminal_id_fc92cce2;
DROP INDEX public.acc_accprivilege_group_id_c5ed7003;
DROP INDEX public.acc_accprivilege_employee_id_5fc55f95;
DROP INDEX public.acc_accprivilege_area_id_2123ff6f;
DROP INDEX public.acc_accholiday_timezone_id_450d2d1e;
DROP INDEX public.acc_accholiday_holiday_id_a9efe924;
DROP INDEX public.acc_accholiday_area_id_d15c19da;
DROP INDEX public.acc_accgroups_area_id_b83745c3;
DROP INDEX public.acc_acccombination_area_id_0d22c34e;
ALTER TABLE ONLY public.workflow_workflowrole DROP CONSTRAINT workflow_workflowrole_role_name_key;
ALTER TABLE ONLY public.workflow_workflowrole DROP CONSTRAINT workflow_workflowrole_role_code_key;
ALTER TABLE ONLY public.workflow_workflowrole DROP CONSTRAINT workflow_workflowrole_pkey;
ALTER TABLE ONLY public.workflow_workflownode DROP CONSTRAINT workflow_workflownode_pkey;
ALTER TABLE ONLY public.workflow_workflownode_notifier DROP CONSTRAINT workflow_workflownode_notifier_pkey;
ALTER TABLE ONLY public.workflow_workflownode_notifier DROP CONSTRAINT workflow_workflownode_no_workflownode_id_workflow_cac02b37_uniq;
ALTER TABLE ONLY public.workflow_workflownode_approver DROP CONSTRAINT workflow_workflownode_approver_pkey;
ALTER TABLE ONLY public.workflow_workflownode_approver DROP CONSTRAINT workflow_workflownode_ap_workflownode_id_workflow_7543ba37_uniq;
ALTER TABLE ONLY public.workflow_workflowinstance DROP CONSTRAINT workflow_workflowinstance_pkey;
ALTER TABLE ONLY public.workflow_workflowengine DROP CONSTRAINT workflow_workflowengine_workflow_code_key;
ALTER TABLE ONLY public.workflow_workflowengine DROP CONSTRAINT workflow_workflowengine_pkey;
ALTER TABLE ONLY public.workflow_workflowengine_employee DROP CONSTRAINT workflow_workflowengine_employee_pkey;
ALTER TABLE ONLY public.workflow_workflowengine_employee DROP CONSTRAINT workflow_workflowengine__workflowengine_id_employ_8128deb2_uniq;
ALTER TABLE ONLY public.workflow_nodeinstance DROP CONSTRAINT workflow_nodeinstance_pkey;
ALTER TABLE ONLY public.visitor_visitortransaction DROP CONSTRAINT visitor_visitortransaction_visitor_id_punch_time_836abbcf_uniq;
ALTER TABLE ONLY public.visitor_visitortransaction DROP CONSTRAINT visitor_visitortransaction_pkey;
ALTER TABLE ONLY public.visitor_visitorlog DROP CONSTRAINT visitor_visitorlog_pkey;
ALTER TABLE ONLY public.visitor_visitorconfig DROP CONSTRAINT visitor_visitorconfig_pkey;
ALTER TABLE ONLY public.visitor_visitorbiophoto DROP CONSTRAINT visitor_visitorbiophoto_pkey;
ALTER TABLE ONLY public.visitor_visitorbiodata DROP CONSTRAINT visitor_visitorbiodata_visitor_id_bio_no_bio_in_e5d598fb_uniq;
ALTER TABLE ONLY public.visitor_visitorbiodata DROP CONSTRAINT visitor_visitorbiodata_pkey;
ALTER TABLE ONLY public.visitor_visitor DROP CONSTRAINT visitor_visitor_visitor_code_key;
ALTER TABLE ONLY public.visitor_visitor DROP CONSTRAINT visitor_visitor_pkey;
ALTER TABLE ONLY public.visitor_visitor_area DROP CONSTRAINT visitor_visitor_area_visitor_id_area_id_27d158cc_uniq;
ALTER TABLE ONLY public.visitor_visitor_area DROP CONSTRAINT visitor_visitor_area_pkey;
ALTER TABLE ONLY public.visitor_visitor_acc_groups DROP CONSTRAINT visitor_visitor_acc_groups_pkey;
ALTER TABLE ONLY public.visitor_visitor_acc_groups DROP CONSTRAINT visitor_visitor_acc_grou_visitor_id_accgroups_id_bb522609_uniq;
ALTER TABLE ONLY public.visitor_reservation DROP CONSTRAINT visitor_reservation_pkey;
ALTER TABLE ONLY public.visitor_reason DROP CONSTRAINT visitor_reason_pkey;
ALTER TABLE ONLY public.sync_job DROP CONSTRAINT sync_job_pkey;
ALTER TABLE ONLY public.sync_job DROP CONSTRAINT sync_job_job_code_job_name_4ec5619e_uniq;
ALTER TABLE ONLY public.sync_employee DROP CONSTRAINT sync_employee_pkey;
ALTER TABLE ONLY public.sync_employee DROP CONSTRAINT sync_employee_emp_code_521bf06d_uniq;
ALTER TABLE ONLY public.sync_department DROP CONSTRAINT sync_department_pkey;
ALTER TABLE ONLY public.sync_department DROP CONSTRAINT sync_department_dept_code_dept_name_93923213_uniq;
ALTER TABLE ONLY public.sync_area DROP CONSTRAINT sync_area_pkey;
ALTER TABLE ONLY public.sync_area DROP CONSTRAINT sync_area_area_code_area_name_200046d1_uniq;
ALTER TABLE ONLY public.staff_stafftoken DROP CONSTRAINT staff_stafftoken_user_id_key;
ALTER TABLE ONLY public.staff_stafftoken DROP CONSTRAINT staff_stafftoken_pkey;
ALTER TABLE ONLY public.rest_framework_tracking_apirequestlog DROP CONSTRAINT rest_framework_tracking_apirequestlog_pkey;
ALTER TABLE ONLY public.personnel_resign DROP CONSTRAINT personnel_resign_pkey;
ALTER TABLE ONLY public.personnel_resign DROP CONSTRAINT personnel_resign_employee_id_key;
ALTER TABLE ONLY public.personnel_position DROP CONSTRAINT personnel_position_pkey;
ALTER TABLE ONLY public.personnel_position DROP CONSTRAINT personnel_position_company_id_position_code_4708726e_uniq;
ALTER TABLE ONLY public.personnel_employment DROP CONSTRAINT personnel_employment_pkey;
ALTER TABLE ONLY public.personnel_employment DROP CONSTRAINT personnel_employment_employee_id_key;
ALTER TABLE ONLY public.personnel_employeeprofile DROP CONSTRAINT personnel_employeeprofile_pkey;
ALTER TABLE ONLY public.personnel_employeeprofile DROP CONSTRAINT personnel_employeeprofile_emp_id_key;
ALTER TABLE ONLY public.personnel_employeeextrainfo DROP CONSTRAINT personnel_employeeextrainfo_pkey;
ALTER TABLE ONLY public.personnel_employeeextrainfo DROP CONSTRAINT personnel_employeeextrainfo_employee_id_key;
ALTER TABLE ONLY public.personnel_employeecustomattribute DROP CONSTRAINT personnel_employeecustomattribute_pkey;
ALTER TABLE ONLY public.personnel_employeecustomattribute DROP CONSTRAINT personnel_employeecustomattribute_attr_name_key;
ALTER TABLE ONLY public.personnel_employeecertification DROP CONSTRAINT personnel_employeecertification_pkey;
ALTER TABLE ONLY public.personnel_employeecertification DROP CONSTRAINT personnel_employeecertif_employee_id_certificatio_7bcf4c7d_uniq;
ALTER TABLE ONLY public.personnel_employeecalendar DROP CONSTRAINT personnel_employeecalendar_pkey;
ALTER TABLE ONLY public.personnel_employeecalendar DROP CONSTRAINT personnel_employeecalendar_employee_id_calendar_10f7278d_uniq;
ALTER TABLE ONLY public.personnel_employee DROP CONSTRAINT personnel_employee_pkey;
ALTER TABLE ONLY public.personnel_employee_flow_role DROP CONSTRAINT personnel_employee_flow_role_pkey;
ALTER TABLE ONLY public.personnel_employee_flow_role DROP CONSTRAINT personnel_employee_flow__employee_id_workflowrole_46b0e5e0_uniq;
ALTER TABLE ONLY public.personnel_employee DROP CONSTRAINT personnel_employee_company_id_emp_code_81daa575_uniq;
ALTER TABLE ONLY public.personnel_employee_area DROP CONSTRAINT personnel_employee_area_pkey;
ALTER TABLE ONLY public.personnel_employee_area DROP CONSTRAINT personnel_employee_area_employee_id_area_id_00b3d777_uniq;
ALTER TABLE ONLY public.personnel_department DROP CONSTRAINT personnel_department_pkey;
ALTER TABLE ONLY public.personnel_department DROP CONSTRAINT personnel_department_company_id_dept_code_dfa8fff7_uniq;
ALTER TABLE ONLY public.personnel_company DROP CONSTRAINT personnel_company_pkey;
ALTER TABLE ONLY public.personnel_company DROP CONSTRAINT personnel_company_company_code_key;
ALTER TABLE ONLY public.personnel_certification DROP CONSTRAINT personnel_certification_pkey;
ALTER TABLE ONLY public.personnel_certification DROP CONSTRAINT personnel_certification_cert_name_key;
ALTER TABLE ONLY public.personnel_certification DROP CONSTRAINT personnel_certification_cert_code_key;
ALTER TABLE ONLY public.personnel_assignareaemployee DROP CONSTRAINT personnel_assignareaemployee_pkey;
ALTER TABLE ONLY public.personnel_area DROP CONSTRAINT personnel_area_pkey;
ALTER TABLE ONLY public.personnel_area DROP CONSTRAINT personnel_area_company_id_area_code_aa39c55c_uniq;
ALTER TABLE ONLY public.payroll_salarystructure DROP CONSTRAINT payroll_salarystructure_pkey;
ALTER TABLE ONLY public.payroll_salarystructure_overtimeformula DROP CONSTRAINT payroll_salarystructure_overtimeformula_pkey;
ALTER TABLE ONLY public.payroll_salarystructure_leaveformula DROP CONSTRAINT payroll_salarystructure_leaveformula_pkey;
ALTER TABLE ONLY public.payroll_salarystructure_increasementformula DROP CONSTRAINT payroll_salarystructure_increasementformula_pkey;
ALTER TABLE ONLY public.payroll_salarystructure_exceptionformula DROP CONSTRAINT payroll_salarystructure_exceptionformula_pkey;
ALTER TABLE ONLY public.payroll_salarystructure_deductionformula DROP CONSTRAINT payroll_salarystructure_deductionformula_pkey;
ALTER TABLE ONLY public.payroll_salarystructure_overtimeformula DROP CONSTRAINT payroll_salarystructure__salarystructure_id_overt_0d0a0e81_uniq;
ALTER TABLE ONLY public.payroll_salarystructure_leaveformula DROP CONSTRAINT payroll_salarystructure__salarystructure_id_leave_4efdce30_uniq;
ALTER TABLE ONLY public.payroll_salarystructure_increasementformula DROP CONSTRAINT payroll_salarystructure__salarystructure_id_incre_749132b3_uniq;
ALTER TABLE ONLY public.payroll_salarystructure_exceptionformula DROP CONSTRAINT payroll_salarystructure__salarystructure_id_excep_a5e869ff_uniq;
ALTER TABLE ONLY public.payroll_salarystructure_deductionformula DROP CONSTRAINT payroll_salarystructure__salarystructure_id_deduc_794e8449_uniq;
ALTER TABLE ONLY public.payroll_salaryadvance DROP CONSTRAINT payroll_salaryadvance_pkey;
ALTER TABLE ONLY public.payroll_reimbursement DROP CONSTRAINT payroll_reimbursement_pkey;
ALTER TABLE ONLY public.payroll_payrollpayloadpaycode DROP CONSTRAINT payroll_payrollpayloadpaycode_pkey;
ALTER TABLE ONLY public.payroll_payrollpayload DROP CONSTRAINT payroll_payrollpayload_pkey;
ALTER TABLE ONLY public.payroll_overtimeformula DROP CONSTRAINT payroll_overtimeformula_pkey;
ALTER TABLE ONLY public.payroll_overtimeformula DROP CONSTRAINT payroll_overtimeformula_name_key;
ALTER TABLE ONLY public.payroll_leaveformula DROP CONSTRAINT payroll_leaveformula_pkey;
ALTER TABLE ONLY public.payroll_leaveformula DROP CONSTRAINT payroll_leaveformula_name_key;
ALTER TABLE ONLY public.payroll_increasementformula DROP CONSTRAINT payroll_increasementformula_pkey;
ALTER TABLE ONLY public.payroll_increasementformula DROP CONSTRAINT payroll_increasementformula_name_key;
ALTER TABLE ONLY public.payroll_extraincrease DROP CONSTRAINT payroll_extraincrease_pkey;
ALTER TABLE ONLY public.payroll_extradeduction DROP CONSTRAINT payroll_extradeduction_pkey;
ALTER TABLE ONLY public.payroll_exceptionformula DROP CONSTRAINT payroll_exceptionformula_pkey;
ALTER TABLE ONLY public.payroll_exceptionformula DROP CONSTRAINT payroll_exceptionformula_name_key;
ALTER TABLE ONLY public.payroll_emppayrollprofile DROP CONSTRAINT payroll_emppayrollprofile_pkey;
ALTER TABLE ONLY public.payroll_emppayrollprofile DROP CONSTRAINT payroll_emppayrollprofile_employee_id_key;
ALTER TABLE ONLY public.payroll_emploan DROP CONSTRAINT payroll_emploan_pkey;
ALTER TABLE ONLY public.payroll_deductionformula DROP CONSTRAINT payroll_deductionformula_pkey;
ALTER TABLE ONLY public.payroll_deductionformula DROP CONSTRAINT payroll_deductionformula_name_key;
ALTER TABLE ONLY public.mobile_mobileapirequestlog DROP CONSTRAINT mobile_mobileapirequestlog_pkey;
ALTER TABLE ONLY public.mobile_gpslocation DROP CONSTRAINT mobile_gpslocation_pkey;
ALTER TABLE ONLY public.mobile_gpsforemployee DROP CONSTRAINT mobile_gpsforemployee_pkey;
ALTER TABLE ONLY public.mobile_gpsforemployee_location DROP CONSTRAINT mobile_gpsforemployee_location_pkey;
ALTER TABLE ONLY public.mobile_gpsforemployee_location DROP CONSTRAINT mobile_gpsforemployee_lo_gpsforemployee_id_gpsloc_9ceb93bf_uniq;
ALTER TABLE ONLY public.mobile_gpsfordepartment DROP CONSTRAINT mobile_gpsfordepartment_pkey;
ALTER TABLE ONLY public.mobile_gpsfordepartment_location DROP CONSTRAINT mobile_gpsfordepartment_location_pkey;
ALTER TABLE ONLY public.mobile_gpsfordepartment_location DROP CONSTRAINT mobile_gpsfordepartment__gpsfordepartment_id_gpsl_58226033_uniq;
ALTER TABLE ONLY public.mobile_appnotification DROP CONSTRAINT mobile_appnotification_pkey;
ALTER TABLE ONLY public.mobile_applist DROP CONSTRAINT mobile_applist_pkey;
ALTER TABLE ONLY public.mobile_appactionlog DROP CONSTRAINT mobile_appactionlog_pkey;
ALTER TABLE ONLY public.mobile_announcement DROP CONSTRAINT mobile_announcement_pkey;
ALTER TABLE ONLY public.meeting_meetingtransaction DROP CONSTRAINT meeting_meetingtransaction_pkey;
ALTER TABLE ONLY public.meeting_meetingtransaction DROP CONSTRAINT meeting_meetingtransaction_emp_id_punch_datetime_65665dce_uniq;
ALTER TABLE ONLY public.meeting_meetingroomdevice DROP CONSTRAINT meeting_meetingroomdevice_pkey;
ALTER TABLE ONLY public.meeting_meetingroomdevice DROP CONSTRAINT meeting_meetingroomdevice_device_id_key;
ALTER TABLE ONLY public.meeting_meetingroom DROP CONSTRAINT meeting_meetingroom_pkey;
ALTER TABLE ONLY public.meeting_meetingroom DROP CONSTRAINT meeting_meetingroom_code_key;
ALTER TABLE ONLY public.meeting_meetingpayloadbase DROP CONSTRAINT meeting_meetingpayloadbase_pkey;
ALTER TABLE ONLY public.meeting_meetingmanuallog DROP CONSTRAINT meeting_meetingmanuallog_pkey;
ALTER TABLE ONLY public.meeting_meetingentity DROP CONSTRAINT meeting_meetingentity_pkey;
ALTER TABLE ONLY public.meeting_meetingentity DROP CONSTRAINT meeting_meetingentity_code_key;
ALTER TABLE ONLY public.meeting_meetingentity_attender DROP CONSTRAINT meeting_meetingentity_attender_pkey;
ALTER TABLE ONLY public.meeting_meetingentity_attender DROP CONSTRAINT meeting_meetingentity_at_meetingentity_id_employe_b556fc2d_uniq;
ALTER TABLE ONLY public.iclock_transactionproofcmd DROP CONSTRAINT iclock_transactionproofcmd_pkey;
ALTER TABLE ONLY public.iclock_transaction DROP CONSTRAINT iclock_transaction_pkey;
ALTER TABLE ONLY public.iclock_transaction DROP CONSTRAINT iclock_transaction_company_code_emp_code_pu_2665c3d7_uniq;
ALTER TABLE ONLY public.iclock_terminalworkcode DROP CONSTRAINT iclock_terminalworkcode_pkey;
ALTER TABLE ONLY public.iclock_terminalworkcode DROP CONSTRAINT iclock_terminalworkcode_code_key;
ALTER TABLE ONLY public.iclock_terminaluploadlog DROP CONSTRAINT iclock_terminaluploadlog_pkey;
ALTER TABLE ONLY public.iclock_terminalparameter DROP CONSTRAINT iclock_terminalparameter_terminal_id_param_name_8abbb5c0_uniq;
ALTER TABLE ONLY public.iclock_terminalparameter DROP CONSTRAINT iclock_terminalparameter_pkey;
ALTER TABLE ONLY public.iclock_terminallog DROP CONSTRAINT iclock_terminallog_pkey;
ALTER TABLE ONLY public.iclock_terminalemployee DROP CONSTRAINT iclock_terminalemployee_pkey;
ALTER TABLE ONLY public.iclock_terminalcommandlog DROP CONSTRAINT iclock_terminalcommandlog_pkey;
ALTER TABLE ONLY public.iclock_terminalcommand DROP CONSTRAINT iclock_terminalcommand_pkey;
ALTER TABLE ONLY public.iclock_terminal DROP CONSTRAINT iclock_terminal_sn_key;
ALTER TABLE ONLY public.iclock_terminal DROP CONSTRAINT iclock_terminal_pkey;
ALTER TABLE ONLY public.iclock_shortmessage DROP CONSTRAINT iclock_shortmessage_pkey;
ALTER TABLE ONLY public.iclock_publicmessage DROP CONSTRAINT iclock_publicmessage_pkey;
ALTER TABLE ONLY public.iclock_privatemessage DROP CONSTRAINT iclock_privatemessage_pkey;
ALTER TABLE ONLY public.iclock_errorcommandlog DROP CONSTRAINT iclock_errorcommandlog_pkey;
ALTER TABLE ONLY public.iclock_devicemoduleconfig DROP CONSTRAINT iclock_devicemoduleconfig_pkey;
ALTER TABLE ONLY public.iclock_biophoto DROP CONSTRAINT iclock_biophoto_pkey;
ALTER TABLE ONLY public.iclock_biodata DROP CONSTRAINT iclock_biodata_pkey;
ALTER TABLE ONLY public.iclock_biodata DROP CONSTRAINT iclock_biodata_employee_id_bio_no_bio_i_b71b2ca9_uniq;
ALTER TABLE ONLY public.guardian_userobjectpermission DROP CONSTRAINT guardian_userobjectpermission_pkey;
ALTER TABLE ONLY public.guardian_userobjectpermission DROP CONSTRAINT guardian_userobjectpermi_user_id_permission_id_ob_b0b3d2fc_uniq;
ALTER TABLE ONLY public.guardian_groupobjectpermission DROP CONSTRAINT guardian_groupobjectpermission_pkey;
ALTER TABLE ONLY public.guardian_groupobjectpermission DROP CONSTRAINT guardian_groupobjectperm_group_id_permission_id_o_3f189f7c_uniq;
ALTER TABLE ONLY public.ep_eptransaction DROP CONSTRAINT ep_eptransaction_pkey;
ALTER TABLE ONLY public.ep_eptransaction DROP CONSTRAINT ep_eptransaction_emp_id_check_datetime_57cec995_uniq;
ALTER TABLE ONLY public.ep_epsetup DROP CONSTRAINT ep_epsetup_pkey;
ALTER TABLE ONLY public.django_session DROP CONSTRAINT django_session_pkey;
ALTER TABLE ONLY public.django_migrations DROP CONSTRAINT django_migrations_pkey;
ALTER TABLE ONLY public.django_content_type DROP CONSTRAINT django_content_type_pkey;
ALTER TABLE ONLY public.django_content_type DROP CONSTRAINT django_content_type_app_label_model_76bd3d3b_uniq;
ALTER TABLE ONLY public.django_celery_beat_solarschedule DROP CONSTRAINT django_celery_beat_solarschedule_pkey;
ALTER TABLE ONLY public.django_celery_beat_solarschedule DROP CONSTRAINT django_celery_beat_solar_event_latitude_longitude_ba64999a_uniq;
ALTER TABLE ONLY public.django_celery_beat_periodictasks DROP CONSTRAINT django_celery_beat_periodictasks_pkey;
ALTER TABLE ONLY public.django_celery_beat_periodictask DROP CONSTRAINT django_celery_beat_periodictask_pkey;
ALTER TABLE ONLY public.django_celery_beat_periodictask DROP CONSTRAINT django_celery_beat_periodictask_name_key;
ALTER TABLE ONLY public.django_celery_beat_intervalschedule DROP CONSTRAINT django_celery_beat_intervalschedule_pkey;
ALTER TABLE ONLY public.django_celery_beat_crontabschedule DROP CONSTRAINT django_celery_beat_crontabschedule_pkey;
ALTER TABLE ONLY public.django_celery_beat_clockedschedule DROP CONSTRAINT django_celery_beat_clockedschedule_pkey;
ALTER TABLE ONLY public.django_admin_log DROP CONSTRAINT django_admin_log_pkey;
ALTER TABLE ONLY public.base_systemsetting DROP CONSTRAINT base_systemsetting_pkey;
ALTER TABLE ONLY public.base_systemlog DROP CONSTRAINT base_systemlog_pkey;
ALTER TABLE ONLY public.base_sysparamdept DROP CONSTRAINT base_sysparamdept_rule_name_key;
ALTER TABLE ONLY public.base_sysparamdept DROP CONSTRAINT base_sysparamdept_pkey;
ALTER TABLE ONLY public.base_sysparam DROP CONSTRAINT base_sysparam_pkey;
ALTER TABLE ONLY public.base_sysparam DROP CONSTRAINT base_sysparam_para_name_para_type_3086789a_uniq;
ALTER TABLE ONLY public.base_sftpsetting DROP CONSTRAINT base_sftpsetting_pkey;
ALTER TABLE ONLY public.base_sendemail DROP CONSTRAINT base_sendemail_pkey;
ALTER TABLE ONLY public.base_securitypolicy DROP CONSTRAINT base_securitypolicy_pkey;
ALTER TABLE ONLY public.base_linenotifysetting DROP CONSTRAINT base_linenotifysetting_pkey;
ALTER TABLE ONLY public.base_linenotifysetting DROP CONSTRAINT base_linenotifysetting_line_notify_dept_id_line_dd79374f_uniq;
ALTER TABLE ONLY public.base_eventalertsetting DROP CONSTRAINT base_eventalertsetting_pkey;
ALTER TABLE ONLY public.base_emailtemplate DROP CONSTRAINT base_emailtemplate_pkey;
ALTER TABLE ONLY public.base_dbbackuplog DROP CONSTRAINT base_dbbackuplog_pkey;
ALTER TABLE ONLY public.base_bookmark DROP CONSTRAINT base_bookmark_pkey;
ALTER TABLE ONLY public.base_autoimporttask DROP CONSTRAINT base_autoimporttask_task_code_key;
ALTER TABLE ONLY public.base_autoimporttask DROP CONSTRAINT base_autoimporttask_pkey;
ALTER TABLE ONLY public.base_autoexporttask DROP CONSTRAINT base_autoexporttask_task_code_key;
ALTER TABLE ONLY public.base_autoexporttask DROP CONSTRAINT base_autoexporttask_pkey;
ALTER TABLE ONLY public.base_autoattexporttask DROP CONSTRAINT base_autoattexporttask_task_code_key;
ALTER TABLE ONLY public.base_autoattexporttask DROP CONSTRAINT base_autoattexporttask_pkey;
ALTER TABLE ONLY public.base_attparamdepts DROP CONSTRAINT base_attparamdepts_rulename_key;
ALTER TABLE ONLY public.base_attparamdepts DROP CONSTRAINT base_attparamdepts_pkey;
ALTER TABLE ONLY public.base_adminlog DROP CONSTRAINT base_adminlog_pkey;
ALTER TABLE ONLY public.authtoken_token DROP CONSTRAINT authtoken_token_user_id_key;
ALTER TABLE ONLY public.authtoken_token DROP CONSTRAINT authtoken_token_pkey;
ALTER TABLE ONLY public.auth_user DROP CONSTRAINT auth_user_username_key;
ALTER TABLE ONLY public.auth_user_user_permissions DROP CONSTRAINT auth_user_user_permissions_pkey;
ALTER TABLE ONLY public.auth_user_user_permissions DROP CONSTRAINT auth_user_user_permissio_myuser_id_permission_id_a558717f_uniq;
ALTER TABLE ONLY public.auth_user_profile DROP CONSTRAINT auth_user_profile_user_id_key;
ALTER TABLE ONLY public.auth_user_profile DROP CONSTRAINT auth_user_profile_pkey;
ALTER TABLE ONLY public.auth_user DROP CONSTRAINT auth_user_pkey;
ALTER TABLE ONLY public.auth_user_groups DROP CONSTRAINT auth_user_groups_pkey;
ALTER TABLE ONLY public.auth_user_groups DROP CONSTRAINT auth_user_groups_myuser_id_group_id_664bdfc3_uniq;
ALTER TABLE ONLY public.auth_user_auth_dept DROP CONSTRAINT auth_user_auth_dept_pkey;
ALTER TABLE ONLY public.auth_user_auth_dept DROP CONSTRAINT auth_user_auth_dept_myuser_id_department_id_61d83386_uniq;
ALTER TABLE ONLY public.auth_user_auth_area DROP CONSTRAINT auth_user_auth_area_pkey;
ALTER TABLE ONLY public.auth_user_auth_area DROP CONSTRAINT auth_user_auth_area_myuser_id_area_id_02a19d63_uniq;
ALTER TABLE ONLY public.auth_permission DROP CONSTRAINT auth_permission_pkey;
ALTER TABLE ONLY public.auth_permission DROP CONSTRAINT auth_permission_content_type_id_codename_01ab375a_uniq;
ALTER TABLE ONLY public.auth_group DROP CONSTRAINT auth_group_pkey;
ALTER TABLE ONLY public.auth_group_permissions DROP CONSTRAINT auth_group_permissions_pkey;
ALTER TABLE ONLY public.auth_group_permissions DROP CONSTRAINT auth_group_permissions_group_id_permission_id_0cd325b0_uniq;
ALTER TABLE ONLY public.auth_group DROP CONSTRAINT auth_group_name_key;
ALTER TABLE ONLY public.attparam DROP CONSTRAINT attparam_pkey;
ALTER TABLE ONLY public.attparam DROP CONSTRAINT attparam_paraname_paratype_6f176d25_uniq;
ALTER TABLE ONLY public.att_webpunch DROP CONSTRAINT att_webpunch_pkey;
ALTER TABLE ONLY public.att_training DROP CONSTRAINT att_training_pkey;
ALTER TABLE ONLY public.att_timeinterval DROP CONSTRAINT att_timeinterval_pkey;
ALTER TABLE ONLY public.att_timeinterval_break_time DROP CONSTRAINT att_timeinterval_break_time_pkey;
ALTER TABLE ONLY public.att_timeinterval_break_time DROP CONSTRAINT att_timeinterval_break_t_timeinterval_id_breaktim_6e1bfb4e_uniq;
ALTER TABLE ONLY public.att_timeinterval DROP CONSTRAINT att_timeinterval_alias_key;
ALTER TABLE ONLY public.att_tempschedule DROP CONSTRAINT att_tempschedule_pkey;
ALTER TABLE ONLY public.att_temporaryschedule DROP CONSTRAINT att_temporaryschedule_pkey;
ALTER TABLE ONLY public.att_shiftdetail DROP CONSTRAINT att_shiftdetail_pkey;
ALTER TABLE ONLY public.att_reporttemplate DROP CONSTRAINT att_reporttemplate_pkey;
ALTER TABLE ONLY public.att_reportparam DROP CONSTRAINT att_reportparam_pkey;
ALTER TABLE ONLY public.att_payloadtimecard DROP CONSTRAINT att_payloadtimecard_pkey;
ALTER TABLE ONLY public.att_payloadtimecard DROP CONSTRAINT att_payloadtimecard_emp_id_att_date_time_table_id_9df16bc5_uniq;
ALTER TABLE ONLY public.att_payloadpunch DROP CONSTRAINT att_payloadpunch_pkey;
ALTER TABLE ONLY public.att_payloadpaycode DROP CONSTRAINT att_payloadpaycode_pkey;
ALTER TABLE ONLY public.att_payloadparing DROP CONSTRAINT att_payloadparing_pkey;
ALTER TABLE ONLY public.att_payloadovertime DROP CONSTRAINT att_payloadovertime_pkey;
ALTER TABLE ONLY public.att_payloadmulpunchset DROP CONSTRAINT att_payloadmulpunchset_pkey;
ALTER TABLE ONLY public.att_payloadexception DROP CONSTRAINT att_payloadexception_pkey;
ALTER TABLE ONLY public.att_payloadeffectpunch DROP CONSTRAINT att_payloadeffectpunch_pkey;
ALTER TABLE ONLY public.att_payloadbreak DROP CONSTRAINT att_payloadbreak_pkey;
ALTER TABLE ONLY public.att_payloadbase DROP CONSTRAINT att_payloadbase_pkey;
ALTER TABLE ONLY public.att_payloadbase DROP CONSTRAINT att_payloadbase_overtime_id_key;
ALTER TABLE ONLY public.att_payloadbase DROP CONSTRAINT att_payloadbase_break_time_id_key;
ALTER TABLE ONLY public.att_payloadattcode DROP CONSTRAINT att_payloadattcode_pkey;
ALTER TABLE ONLY public.att_paycode DROP CONSTRAINT att_paycode_pkey;
ALTER TABLE ONLY public.att_paycode DROP CONSTRAINT att_paycode_name_key;
ALTER TABLE ONLY public.att_paycode DROP CONSTRAINT att_paycode_code_key;
ALTER TABLE ONLY public.att_overtimepolicy DROP CONSTRAINT att_overtimepolicy_pkey;
ALTER TABLE ONLY public.att_overtime DROP CONSTRAINT att_overtime_pkey;
ALTER TABLE ONLY public.att_manuallog DROP CONSTRAINT att_manuallog_pkey;
ALTER TABLE ONLY public.att_leaveyearbalance DROP CONSTRAINT att_leaveyearbalance_pkey;
ALTER TABLE ONLY public.att_leaveyearbalance DROP CONSTRAINT att_leaveyearbalance_employee_id_year_pay_code_id_2ec71517_uniq;
ALTER TABLE ONLY public.att_leavegroupdetail DROP CONSTRAINT att_leavegroupdetail_pkey;
ALTER TABLE ONLY public.att_leavegroup DROP CONSTRAINT att_leavegroup_pkey;
ALTER TABLE ONLY public.att_leavegroup DROP CONSTRAINT att_leavegroup_name_key;
ALTER TABLE ONLY public.att_leavegroup DROP CONSTRAINT att_leavegroup_code_key;
ALTER TABLE ONLY public.att_leave DROP CONSTRAINT att_leave_pkey;
ALTER TABLE ONLY public.att_holiday DROP CONSTRAINT att_holiday_pkey;
ALTER TABLE ONLY public.att_groupschedule DROP CONSTRAINT att_groupschedule_pkey;
ALTER TABLE ONLY public.att_grouppolicy DROP CONSTRAINT att_grouppolicy_pkey;
ALTER TABLE ONLY public.att_deptattrule DROP CONSTRAINT att_deptattrule_pkey;
ALTER TABLE ONLY public.att_departmentschedule DROP CONSTRAINT att_departmentschedule_pkey;
ALTER TABLE ONLY public.att_departmentpolicy DROP CONSTRAINT att_departmentpolicy_pkey;
ALTER TABLE ONLY public.att_changeschedule DROP CONSTRAINT att_changeschedule_pkey;
ALTER TABLE ONLY public.att_calculatetask DROP CONSTRAINT att_calculatetask_pkey;
ALTER TABLE ONLY public.att_calculatelastdate DROP CONSTRAINT att_calculatelastdate_pkey;
ALTER TABLE ONLY public.att_breaktime DROP CONSTRAINT att_breaktime_pkey;
ALTER TABLE ONLY public.att_breaktime DROP CONSTRAINT att_breaktime_alias_6212d9cf_uniq;
ALTER TABLE ONLY public.att_attshift DROP CONSTRAINT att_attshift_pkey;
ALTER TABLE ONLY public.att_attschedule DROP CONSTRAINT att_attschedule_pkey;
ALTER TABLE ONLY public.att_attrule DROP CONSTRAINT att_attrule_pkey;
ALTER TABLE ONLY public.att_attreportsetting DROP CONSTRAINT att_attreportsetting_pkey;
ALTER TABLE ONLY public.att_attpolicy DROP CONSTRAINT att_attpolicy_pkey;
ALTER TABLE ONLY public.att_attgroup DROP CONSTRAINT att_attgroup_pkey;
ALTER TABLE ONLY public.att_attgroup DROP CONSTRAINT att_attgroup_name_key;
ALTER TABLE ONLY public.att_attgroup DROP CONSTRAINT att_attgroup_code_key;
ALTER TABLE ONLY public.att_attemployee DROP CONSTRAINT att_attemployee_pkey;
ALTER TABLE ONLY public.att_attemployee DROP CONSTRAINT att_attemployee_emp_id_key;
ALTER TABLE ONLY public.att_attcode DROP CONSTRAINT att_attcode_pkey;
ALTER TABLE ONLY public.att_attcode DROP CONSTRAINT att_attcode_code_key;
ALTER TABLE ONLY public.att_attcode DROP CONSTRAINT att_attcode_alias_key;
ALTER TABLE ONLY public.att_attcalclog DROP CONSTRAINT att_attcalclog_pkey;
ALTER TABLE ONLY public.accounts_usernotification DROP CONSTRAINT accounts_usernotification_pkey;
ALTER TABLE ONLY public.accounts_adminbiodata DROP CONSTRAINT accounts_adminbiodata_pkey;
ALTER TABLE ONLY public.acc_acctimezone DROP CONSTRAINT acc_acctimezone_pkey;
ALTER TABLE ONLY public.acc_acctimezone DROP CONSTRAINT acc_acctimezone_area_id_timezone_no_0cb8250f_uniq;
ALTER TABLE ONLY public.acc_accterminal DROP CONSTRAINT acc_accterminal_pkey;
ALTER TABLE ONLY public.acc_accprivilege DROP CONSTRAINT acc_accprivilege_pkey;
ALTER TABLE ONLY public.acc_accprivilege DROP CONSTRAINT acc_accprivilege_area_id_employee_id_group_id_f3b297d8_uniq;
ALTER TABLE ONLY public.acc_accholiday DROP CONSTRAINT acc_accholiday_pkey;
ALTER TABLE ONLY public.acc_accholiday DROP CONSTRAINT acc_accholiday_area_id_holiday_id_6630c2eb_uniq;
ALTER TABLE ONLY public.acc_accgroups DROP CONSTRAINT acc_accgroups_pkey;
ALTER TABLE ONLY public.acc_accgroups DROP CONSTRAINT acc_accgroups_area_id_group_no_5130a89c_uniq;
ALTER TABLE ONLY public.acc_acccombination DROP CONSTRAINT acc_acccombination_pkey;
ALTER TABLE ONLY public.acc_acccombination DROP CONSTRAINT acc_acccombination_area_id_combination_no_619eb4f5_uniq;
ALTER TABLE public.workflow_workflowrole ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.workflow_workflownode_notifier ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.workflow_workflownode_approver ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.workflow_workflownode ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.workflow_workflowinstance ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.workflow_workflowengine_employee ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.workflow_workflowengine ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.workflow_nodeinstance ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.visitor_visitortransaction ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.visitor_visitorlog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.visitor_visitorconfig ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.visitor_visitorbiophoto ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.visitor_visitorbiodata ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.visitor_visitor_area ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.visitor_visitor_acc_groups ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.visitor_visitor ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.visitor_reason ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.sync_job ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.sync_employee ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.sync_department ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.sync_area ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.rest_framework_tracking_apirequestlog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_resign ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_position ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_employment ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_employeeprofile ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_employeeextrainfo ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_employeecustomattribute ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_employeecertification ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_employeecalendar ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_employee_flow_role ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_employee_area ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_employee ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_department ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_company ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_certification ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_assignareaemployee ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.personnel_area ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_salarystructure_overtimeformula ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_salarystructure_leaveformula ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_salarystructure_increasementformula ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_salarystructure_exceptionformula ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_salarystructure_deductionformula ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_salarystructure ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_salaryadvance ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_reimbursement ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_payrollpayloadpaycode ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_payrollpayload ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_overtimeformula ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_leaveformula ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_increasementformula ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_extraincrease ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_extradeduction ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_exceptionformula ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_emppayrollprofile ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_emploan ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.payroll_deductionformula ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.mobile_mobileapirequestlog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.mobile_gpslocation ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.mobile_gpsforemployee_location ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.mobile_gpsforemployee ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.mobile_gpsfordepartment_location ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.mobile_gpsfordepartment ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.mobile_appnotification ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.mobile_applist ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.mobile_appactionlog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.mobile_announcement ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.meeting_meetingtransaction ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.meeting_meetingroomdevice ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.meeting_meetingroom ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.meeting_meetingentity_attender ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_transactionproofcmd ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_transaction ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_terminalworkcode ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_terminaluploadlog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_terminalparameter ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_terminallog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_terminalemployee ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_terminalcommandlog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_terminalcommand ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_terminal ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_shortmessage ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_publicmessage ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_privatemessage ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_errorcommandlog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_devicemoduleconfig ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_biophoto ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.iclock_biodata ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.guardian_userobjectpermission ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.guardian_groupobjectpermission ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.ep_eptransaction ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.ep_epsetup ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.django_migrations ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.django_content_type ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.django_celery_beat_solarschedule ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.django_celery_beat_periodictask ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.django_celery_beat_intervalschedule ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.django_celery_beat_crontabschedule ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.django_celery_beat_clockedschedule ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.django_admin_log ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_systemsetting ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_systemlog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_sysparamdept ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_sysparam ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_sftpsetting ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_sendemail ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_securitypolicy ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_linenotifysetting ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_eventalertsetting ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_emailtemplate ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_dbbackuplog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_bookmark ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_autoimporttask ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_autoexporttask ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_autoattexporttask ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_attparamdepts ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.base_adminlog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.auth_user_user_permissions ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.auth_user_profile ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.auth_user_groups ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.auth_user_auth_dept ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.auth_user_auth_area ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.auth_user ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.auth_permission ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.auth_group_permissions ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.auth_group ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.attparam ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_timeinterval_break_time ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_timeinterval ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_tempschedule ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_temporaryschedule ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_shiftdetail ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_reporttemplate ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_payloadmulpunchset ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_paycode ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_overtimepolicy ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_leaveyearbalance ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_leavegroupdetail ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_leavegroup ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_holiday ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_groupschedule ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_grouppolicy ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_deptattrule ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_departmentschedule ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_departmentpolicy ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_calculatetask ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_calculatelastdate ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_breaktime ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_attshift ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_attschedule ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_attreportsetting ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_attpolicy ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_attgroup ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_attemployee ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_attcode ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.att_attcalclog ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.accounts_usernotification ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.accounts_adminbiodata ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.acc_acctimezone ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.acc_accterminal ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.acc_accprivilege ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.acc_accholiday ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.acc_accgroups ALTER COLUMN id DROP DEFAULT;
ALTER TABLE public.acc_acccombination ALTER COLUMN id DROP DEFAULT;
DROP SEQUENCE public.workflow_workflowrole_id_seq;
DROP TABLE public.workflow_workflowrole;
DROP SEQUENCE public.workflow_workflownode_notifier_id_seq;
DROP TABLE public.workflow_workflownode_notifier;
DROP SEQUENCE public.workflow_workflownode_id_seq;
DROP SEQUENCE public.workflow_workflownode_approver_id_seq;
DROP TABLE public.workflow_workflownode_approver;
DROP TABLE public.workflow_workflownode;
DROP SEQUENCE public.workflow_workflowinstance_id_seq;
DROP TABLE public.workflow_workflowinstance;
DROP SEQUENCE public.workflow_workflowengine_id_seq;
DROP SEQUENCE public.workflow_workflowengine_employee_id_seq;
DROP TABLE public.workflow_workflowengine_employee;
DROP TABLE public.workflow_workflowengine;
DROP SEQUENCE public.workflow_nodeinstance_id_seq;
DROP TABLE public.workflow_nodeinstance;
DROP SEQUENCE public.visitor_visitortransaction_id_seq;
DROP TABLE public.visitor_visitortransaction;
DROP SEQUENCE public.visitor_visitorlog_id_seq;
DROP TABLE public.visitor_visitorlog;
DROP SEQUENCE public.visitor_visitorconfig_id_seq;
DROP TABLE public.visitor_visitorconfig;
DROP SEQUENCE public.visitor_visitorbiophoto_id_seq;
DROP TABLE public.visitor_visitorbiophoto;
DROP SEQUENCE public.visitor_visitorbiodata_id_seq;
DROP TABLE public.visitor_visitorbiodata;
DROP SEQUENCE public.visitor_visitor_id_seq;
DROP SEQUENCE public.visitor_visitor_area_id_seq;
DROP TABLE public.visitor_visitor_area;
DROP SEQUENCE public.visitor_visitor_acc_groups_id_seq;
DROP TABLE public.visitor_visitor_acc_groups;
DROP TABLE public.visitor_visitor;
DROP TABLE public.visitor_reservation;
DROP SEQUENCE public.visitor_reason_id_seq;
DROP TABLE public.visitor_reason;
DROP SEQUENCE public.sync_job_id_seq;
DROP TABLE public.sync_job;
DROP SEQUENCE public.sync_employee_id_seq;
DROP TABLE public.sync_employee;
DROP SEQUENCE public.sync_department_id_seq;
DROP TABLE public.sync_department;
DROP SEQUENCE public.sync_area_id_seq;
DROP TABLE public.sync_area;
DROP TABLE public.staff_stafftoken;
DROP SEQUENCE public.rest_framework_tracking_apirequestlog_id_seq;
DROP TABLE public.rest_framework_tracking_apirequestlog;
DROP SEQUENCE public.personnel_resign_id_seq;
DROP TABLE public.personnel_resign;
DROP SEQUENCE public.personnel_position_id_seq;
DROP TABLE public.personnel_position;
DROP SEQUENCE public.personnel_employment_id_seq;
DROP TABLE public.personnel_employment;
DROP SEQUENCE public.personnel_employeeprofile_id_seq;
DROP TABLE public.personnel_employeeprofile;
DROP SEQUENCE public.personnel_employeeextrainfo_id_seq;
DROP TABLE public.personnel_employeeextrainfo;
DROP SEQUENCE public.personnel_employeecustomattribute_id_seq;
DROP TABLE public.personnel_employeecustomattribute;
DROP SEQUENCE public.personnel_employeecertification_id_seq;
DROP TABLE public.personnel_employeecertification;
DROP SEQUENCE public.personnel_employeecalendar_id_seq;
DROP TABLE public.personnel_employeecalendar;
DROP SEQUENCE public.personnel_employee_id_seq;
DROP SEQUENCE public.personnel_employee_flow_role_id_seq;
DROP TABLE public.personnel_employee_flow_role;
DROP SEQUENCE public.personnel_employee_area_id_seq;
DROP TABLE public.personnel_employee_area;
DROP TABLE public.personnel_employee;
DROP SEQUENCE public.personnel_department_id_seq;
DROP TABLE public.personnel_department;
DROP SEQUENCE public.personnel_company_id_seq;
DROP TABLE public.personnel_company;
DROP SEQUENCE public.personnel_certification_id_seq;
DROP TABLE public.personnel_certification;
DROP SEQUENCE public.personnel_assignareaemployee_id_seq;
DROP TABLE public.personnel_assignareaemployee;
DROP SEQUENCE public.personnel_area_id_seq;
DROP TABLE public.personnel_area;
DROP SEQUENCE public.payroll_salarystructure_overtimeformula_id_seq;
DROP TABLE public.payroll_salarystructure_overtimeformula;
DROP SEQUENCE public.payroll_salarystructure_leaveformula_id_seq;
DROP TABLE public.payroll_salarystructure_leaveformula;
DROP SEQUENCE public.payroll_salarystructure_increasementformula_id_seq;
DROP TABLE public.payroll_salarystructure_increasementformula;
DROP SEQUENCE public.payroll_salarystructure_id_seq;
DROP SEQUENCE public.payroll_salarystructure_exceptionformula_id_seq;
DROP TABLE public.payroll_salarystructure_exceptionformula;
DROP SEQUENCE public.payroll_salarystructure_deductionformula_id_seq;
DROP TABLE public.payroll_salarystructure_deductionformula;
DROP TABLE public.payroll_salarystructure;
DROP SEQUENCE public.payroll_salaryadvance_id_seq;
DROP TABLE public.payroll_salaryadvance;
DROP SEQUENCE public.payroll_reimbursement_id_seq;
DROP TABLE public.payroll_reimbursement;
DROP SEQUENCE public.payroll_payrollpayloadpaycode_id_seq;
DROP TABLE public.payroll_payrollpayloadpaycode;
DROP SEQUENCE public.payroll_payrollpayload_id_seq;
DROP TABLE public.payroll_payrollpayload;
DROP SEQUENCE public.payroll_overtimeformula_id_seq;
DROP TABLE public.payroll_overtimeformula;
DROP SEQUENCE public.payroll_leaveformula_id_seq;
DROP TABLE public.payroll_leaveformula;
DROP SEQUENCE public.payroll_increasementformula_id_seq;
DROP TABLE public.payroll_increasementformula;
DROP SEQUENCE public.payroll_extraincrease_id_seq;
DROP TABLE public.payroll_extraincrease;
DROP SEQUENCE public.payroll_extradeduction_id_seq;
DROP TABLE public.payroll_extradeduction;
DROP SEQUENCE public.payroll_exceptionformula_id_seq;
DROP TABLE public.payroll_exceptionformula;
DROP SEQUENCE public.payroll_emppayrollprofile_id_seq;
DROP TABLE public.payroll_emppayrollprofile;
DROP SEQUENCE public.payroll_emploan_id_seq;
DROP TABLE public.payroll_emploan;
DROP SEQUENCE public.payroll_deductionformula_id_seq;
DROP TABLE public.payroll_deductionformula;
DROP SEQUENCE public.mobile_mobileapirequestlog_id_seq;
DROP TABLE public.mobile_mobileapirequestlog;
DROP SEQUENCE public.mobile_gpslocation_id_seq;
DROP TABLE public.mobile_gpslocation;
DROP SEQUENCE public.mobile_gpsforemployee_location_id_seq;
DROP TABLE public.mobile_gpsforemployee_location;
DROP SEQUENCE public.mobile_gpsforemployee_id_seq;
DROP TABLE public.mobile_gpsforemployee;
DROP SEQUENCE public.mobile_gpsfordepartment_location_id_seq;
DROP TABLE public.mobile_gpsfordepartment_location;
DROP SEQUENCE public.mobile_gpsfordepartment_id_seq;
DROP TABLE public.mobile_gpsfordepartment;
DROP SEQUENCE public.mobile_appnotification_id_seq;
DROP TABLE public.mobile_appnotification;
DROP SEQUENCE public.mobile_applist_id_seq;
DROP TABLE public.mobile_applist;
DROP SEQUENCE public.mobile_appactionlog_id_seq;
DROP TABLE public.mobile_appactionlog;
DROP SEQUENCE public.mobile_announcement_id_seq;
DROP TABLE public.mobile_announcement;
DROP SEQUENCE public.meeting_meetingtransaction_id_seq;
DROP TABLE public.meeting_meetingtransaction;
DROP SEQUENCE public.meeting_meetingroomdevice_id_seq;
DROP TABLE public.meeting_meetingroomdevice;
DROP SEQUENCE public.meeting_meetingroom_id_seq;
DROP TABLE public.meeting_meetingroom;
DROP TABLE public.meeting_meetingpayloadbase;
DROP TABLE public.meeting_meetingmanuallog;
DROP SEQUENCE public.meeting_meetingentity_attender_id_seq;
DROP TABLE public.meeting_meetingentity_attender;
DROP TABLE public.meeting_meetingentity;
DROP SEQUENCE public.iclock_transactionproofcmd_id_seq;
DROP TABLE public.iclock_transactionproofcmd;
DROP SEQUENCE public.iclock_transaction_id_seq;
DROP TABLE public.iclock_transaction;
DROP SEQUENCE public.iclock_terminalworkcode_id_seq;
DROP TABLE public.iclock_terminalworkcode;
DROP SEQUENCE public.iclock_terminaluploadlog_id_seq;
DROP TABLE public.iclock_terminaluploadlog;
DROP SEQUENCE public.iclock_terminalparameter_id_seq;
DROP TABLE public.iclock_terminalparameter;
DROP SEQUENCE public.iclock_terminallog_id_seq;
DROP TABLE public.iclock_terminallog;
DROP SEQUENCE public.iclock_terminalemployee_id_seq;
DROP TABLE public.iclock_terminalemployee;
DROP SEQUENCE public.iclock_terminalcommandlog_id_seq;
DROP TABLE public.iclock_terminalcommandlog;
DROP SEQUENCE public.iclock_terminalcommand_id_seq;
DROP TABLE public.iclock_terminalcommand;
DROP SEQUENCE public.iclock_terminal_id_seq;
DROP TABLE public.iclock_terminal;
DROP SEQUENCE public.iclock_shortmessage_id_seq;
DROP TABLE public.iclock_shortmessage;
DROP SEQUENCE public.iclock_publicmessage_id_seq;
DROP TABLE public.iclock_publicmessage;
DROP SEQUENCE public.iclock_privatemessage_id_seq;
DROP TABLE public.iclock_privatemessage;
DROP SEQUENCE public.iclock_errorcommandlog_id_seq;
DROP TABLE public.iclock_errorcommandlog;
DROP SEQUENCE public.iclock_devicemoduleconfig_id_seq;
DROP TABLE public.iclock_devicemoduleconfig;
DROP SEQUENCE public.iclock_biophoto_id_seq;
DROP TABLE public.iclock_biophoto;
DROP SEQUENCE public.iclock_biodata_id_seq;
DROP TABLE public.iclock_biodata;
DROP SEQUENCE public.guardian_userobjectpermission_id_seq;
DROP TABLE public.guardian_userobjectpermission;
DROP SEQUENCE public.guardian_groupobjectpermission_id_seq;
DROP TABLE public.guardian_groupobjectpermission;
DROP SEQUENCE public.ep_eptransaction_id_seq;
DROP TABLE public.ep_eptransaction;
DROP SEQUENCE public.ep_epsetup_id_seq;
DROP TABLE public.ep_epsetup;
DROP TABLE public.django_session;
DROP SEQUENCE public.django_migrations_id_seq;
DROP TABLE public.django_migrations;
DROP SEQUENCE public.django_content_type_id_seq;
DROP TABLE public.django_content_type;
DROP SEQUENCE public.django_celery_beat_solarschedule_id_seq;
DROP TABLE public.django_celery_beat_solarschedule;
DROP TABLE public.django_celery_beat_periodictasks;
DROP SEQUENCE public.django_celery_beat_periodictask_id_seq;
DROP TABLE public.django_celery_beat_periodictask;
DROP SEQUENCE public.django_celery_beat_intervalschedule_id_seq;
DROP TABLE public.django_celery_beat_intervalschedule;
DROP SEQUENCE public.django_celery_beat_crontabschedule_id_seq;
DROP TABLE public.django_celery_beat_crontabschedule;
DROP SEQUENCE public.django_celery_beat_clockedschedule_id_seq;
DROP TABLE public.django_celery_beat_clockedschedule;
DROP SEQUENCE public.django_admin_log_id_seq;
DROP TABLE public.django_admin_log;
DROP SEQUENCE public.base_systemsetting_id_seq;
DROP TABLE public.base_systemsetting;
DROP SEQUENCE public.base_systemlog_id_seq;
DROP TABLE public.base_systemlog;
DROP SEQUENCE public.base_sysparamdept_id_seq;
DROP TABLE public.base_sysparamdept;
DROP SEQUENCE public.base_sysparam_id_seq;
DROP TABLE public.base_sysparam;
DROP SEQUENCE public.base_sftpsetting_id_seq;
DROP TABLE public.base_sftpsetting;
DROP SEQUENCE public.base_sendemail_id_seq;
DROP TABLE public.base_sendemail;
DROP SEQUENCE public.base_securitypolicy_id_seq;
DROP TABLE public.base_securitypolicy;
DROP SEQUENCE public.base_linenotifysetting_id_seq;
DROP TABLE public.base_linenotifysetting;
DROP SEQUENCE public.base_eventalertsetting_id_seq;
DROP TABLE public.base_eventalertsetting;
DROP SEQUENCE public.base_emailtemplate_id_seq;
DROP TABLE public.base_emailtemplate;
DROP SEQUENCE public.base_dbbackuplog_id_seq;
DROP TABLE public.base_dbbackuplog;
DROP SEQUENCE public.base_bookmark_id_seq;
DROP TABLE public.base_bookmark;
DROP SEQUENCE public.base_autoimporttask_id_seq;
DROP TABLE public.base_autoimporttask;
DROP SEQUENCE public.base_autoexporttask_id_seq;
DROP TABLE public.base_autoexporttask;
DROP SEQUENCE public.base_autoattexporttask_id_seq;
DROP TABLE public.base_autoattexporttask;
DROP SEQUENCE public.base_attparamdepts_id_seq;
DROP TABLE public.base_attparamdepts;
DROP SEQUENCE public.base_adminlog_id_seq;
DROP TABLE public.base_adminlog;
DROP TABLE public.authtoken_token;
DROP SEQUENCE public.auth_user_user_permissions_id_seq;
DROP TABLE public.auth_user_user_permissions;
DROP SEQUENCE public.auth_user_profile_id_seq;
DROP TABLE public.auth_user_profile;
DROP SEQUENCE public.auth_user_id_seq;
DROP SEQUENCE public.auth_user_groups_id_seq;
DROP TABLE public.auth_user_groups;
DROP SEQUENCE public.auth_user_auth_dept_id_seq;
DROP TABLE public.auth_user_auth_dept;
DROP SEQUENCE public.auth_user_auth_area_id_seq;
DROP TABLE public.auth_user_auth_area;
DROP TABLE public.auth_user;
DROP SEQUENCE public.auth_permission_id_seq;
DROP TABLE public.auth_permission;
DROP SEQUENCE public.auth_group_permissions_id_seq;
DROP TABLE public.auth_group_permissions;
DROP SEQUENCE public.auth_group_id_seq;
DROP TABLE public.auth_group;
DROP SEQUENCE public.attparam_id_seq;
DROP TABLE public.attparam;
DROP TABLE public.att_webpunch;
DROP TABLE public.att_training;
DROP SEQUENCE public.att_timeinterval_id_seq;
DROP SEQUENCE public.att_timeinterval_break_time_id_seq;
DROP TABLE public.att_timeinterval_break_time;
DROP TABLE public.att_timeinterval;
DROP SEQUENCE public.att_tempschedule_id_seq;
DROP TABLE public.att_tempschedule;
DROP SEQUENCE public.att_temporaryschedule_id_seq;
DROP TABLE public.att_temporaryschedule;
DROP SEQUENCE public.att_shiftdetail_id_seq;
DROP TABLE public.att_shiftdetail;
DROP SEQUENCE public.att_reporttemplate_id_seq;
DROP TABLE public.att_reporttemplate;
DROP TABLE public.att_reportparam;
DROP TABLE public.att_payloadtimecard;
DROP TABLE public.att_payloadpunch;
DROP TABLE public.att_payloadpaycode;
DROP TABLE public.att_payloadparing;
DROP TABLE public.att_payloadovertime;
DROP SEQUENCE public.att_payloadmulpunchset_id_seq;
DROP TABLE public.att_payloadmulpunchset;
DROP TABLE public.att_payloadexception;
DROP TABLE public.att_payloadeffectpunch;
DROP TABLE public.att_payloadbreak;
DROP TABLE public.att_payloadbase;
DROP TABLE public.att_payloadattcode;
DROP SEQUENCE public.att_paycode_id_seq;
DROP TABLE public.att_paycode;
DROP SEQUENCE public.att_overtimepolicy_id_seq;
DROP TABLE public.att_overtimepolicy;
DROP TABLE public.att_overtime;
DROP TABLE public.att_manuallog;
DROP SEQUENCE public.att_leaveyearbalance_id_seq;
DROP TABLE public.att_leaveyearbalance;
DROP SEQUENCE public.att_leavegroupdetail_id_seq;
DROP TABLE public.att_leavegroupdetail;
DROP SEQUENCE public.att_leavegroup_id_seq;
DROP TABLE public.att_leavegroup;
DROP TABLE public.att_leave;
DROP SEQUENCE public.att_holiday_id_seq;
DROP TABLE public.att_holiday;
DROP SEQUENCE public.att_groupschedule_id_seq;
DROP TABLE public.att_groupschedule;
DROP SEQUENCE public.att_grouppolicy_id_seq;
DROP TABLE public.att_grouppolicy;
DROP SEQUENCE public.att_deptattrule_id_seq;
DROP TABLE public.att_deptattrule;
DROP SEQUENCE public.att_departmentschedule_id_seq;
DROP TABLE public.att_departmentschedule;
DROP SEQUENCE public.att_departmentpolicy_id_seq;
DROP TABLE public.att_departmentpolicy;
DROP TABLE public.att_changeschedule;
DROP SEQUENCE public.att_calculatetask_id_seq;
DROP TABLE public.att_calculatetask;
DROP SEQUENCE public.att_calculatelastdate_id_seq;
DROP TABLE public.att_calculatelastdate;
DROP SEQUENCE public.att_breaktime_id_seq;
DROP TABLE public.att_breaktime;
DROP SEQUENCE public.att_attshift_id_seq;
DROP TABLE public.att_attshift;
DROP SEQUENCE public.att_attschedule_id_seq;
DROP TABLE public.att_attschedule;
DROP TABLE public.att_attrule;
DROP SEQUENCE public.att_attreportsetting_id_seq;
DROP TABLE public.att_attreportsetting;
DROP SEQUENCE public.att_attpolicy_id_seq;
DROP TABLE public.att_attpolicy;
DROP SEQUENCE public.att_attgroup_id_seq;
DROP TABLE public.att_attgroup;
DROP SEQUENCE public.att_attemployee_id_seq;
DROP TABLE public.att_attemployee;
DROP SEQUENCE public.att_attcode_id_seq;
DROP TABLE public.att_attcode;
DROP SEQUENCE public.att_attcalclog_id_seq;
DROP TABLE public.att_attcalclog;
DROP SEQUENCE public.accounts_usernotification_id_seq;
DROP TABLE public.accounts_usernotification;
DROP SEQUENCE public.accounts_adminbiodata_id_seq;
DROP TABLE public.accounts_adminbiodata;
DROP SEQUENCE public.acc_acctimezone_id_seq;
DROP TABLE public.acc_acctimezone;
DROP SEQUENCE public.acc_accterminal_id_seq;
DROP TABLE public.acc_accterminal;
DROP SEQUENCE public.acc_accprivilege_id_seq;
DROP TABLE public.acc_accprivilege;
DROP SEQUENCE public.acc_accholiday_id_seq;
DROP TABLE public.acc_accholiday;
DROP SEQUENCE public.acc_accgroups_id_seq;
DROP TABLE public.acc_accgroups;
DROP SEQUENCE public.acc_acccombination_id_seq;
DROP TABLE public.acc_acccombination;
DROP EXTENSION plpgsql;
DROP SCHEMA public;
--
-- Name: public; Type: SCHEMA; Schema: -; Owner: Administrator
--

CREATE SCHEMA public;


ALTER SCHEMA public OWNER TO "Administrator";

--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: Administrator
--

COMMENT ON SCHEMA public IS 'standard public schema';


--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';




--
-- Name: acc_acccombination; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.acc_acccombination (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    combination_no integer NOT NULL,
    combination_name character varying(100) NOT NULL,
    group1 integer,
    group2 integer,
    group3 integer,
    group4 integer,
    group5 integer,
    remark character varying(999),
    update_time timestamp with time zone,
    area_id integer NOT NULL
);


ALTER TABLE public.acc_acccombination OWNER TO postgres;

--
-- Name: acc_acccombination_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.acc_acccombination_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.acc_acccombination_id_seq OWNER TO postgres;

--
-- Name: acc_acccombination_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.acc_acccombination_id_seq OWNED BY public.acc_acccombination.id;


--
-- Name: acc_accgroups; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.acc_accgroups (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    group_no integer NOT NULL,
    group_name character varying(100) NOT NULL,
    verify_mode integer NOT NULL,
    timezone1 integer,
    timezone2 integer,
    timezone3 integer,
    is_include_holiday smallint NOT NULL,
    update_time timestamp with time zone,
    area_id integer NOT NULL
);


ALTER TABLE public.acc_accgroups OWNER TO postgres;

--
-- Name: acc_accgroups_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.acc_accgroups_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.acc_accgroups_id_seq OWNER TO postgres;

--
-- Name: acc_accgroups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.acc_accgroups_id_seq OWNED BY public.acc_accgroups.id;


--
-- Name: acc_accholiday; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.acc_accholiday (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    update_time timestamp with time zone,
    area_id integer NOT NULL,
    holiday_id integer NOT NULL,
    timezone_id integer NOT NULL
);


ALTER TABLE public.acc_accholiday OWNER TO postgres;

--
-- Name: acc_accholiday_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.acc_accholiday_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.acc_accholiday_id_seq OWNER TO postgres;

--
-- Name: acc_accholiday_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.acc_accholiday_id_seq OWNED BY public.acc_accholiday.id;


--
-- Name: acc_accprivilege; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.acc_accprivilege (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    is_group_timezone smallint NOT NULL,
    timezone1 integer,
    timezone2 integer,
    timezone3 integer,
    is_group_verifycode smallint NOT NULL,
    verify_mode integer,
    update_time timestamp with time zone,
    area_id integer NOT NULL,
    employee_id integer NOT NULL,
    group_id integer NOT NULL
);


ALTER TABLE public.acc_accprivilege OWNER TO postgres;

--
-- Name: acc_accprivilege_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.acc_accprivilege_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.acc_accprivilege_id_seq OWNER TO postgres;

--
-- Name: acc_accprivilege_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.acc_accprivilege_id_seq OWNED BY public.acc_accprivilege.id;


--
-- Name: acc_accterminal; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.acc_accterminal (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    door_name character varying(50),
    door_lock_delay integer NOT NULL,
    door_sensor_delay integer NOT NULL,
    door_sensor_type smallint NOT NULL,
    door_alarm_delay integer NOT NULL,
    retry_times smallint NOT NULL,
    valid_holiday smallint NOT NULL,
    nc_time_period integer NOT NULL,
    no_time_period integer NOT NULL,
    speaker_alarm smallint NOT NULL,
    duress_fun_on smallint NOT NULL,
    alarm_1_1 smallint NOT NULL,
    alarm_1_n smallint NOT NULL,
    alarm_password smallint NOT NULL,
    duress_alarm_delay integer NOT NULL,
    anti_passback_mode smallint NOT NULL,
    anti_door_direction smallint NOT NULL,
    verify_mode_485 smallint NOT NULL,
    push_time timestamp with time zone,
    terminal_id integer NOT NULL
);


ALTER TABLE public.acc_accterminal OWNER TO postgres;

--
-- Name: acc_accterminal_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.acc_accterminal_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.acc_accterminal_id_seq OWNER TO postgres;

--
-- Name: acc_accterminal_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.acc_accterminal_id_seq OWNED BY public.acc_accterminal.id;


--
-- Name: acc_acctimezone; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.acc_acctimezone (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    timezone_no integer NOT NULL,
    timezone_name character varying(100) NOT NULL,
    sun_start time without time zone NOT NULL,
    sun_end time without time zone NOT NULL,
    sun_on smallint,
    mon_start time without time zone NOT NULL,
    mon_end time without time zone NOT NULL,
    mon_on smallint,
    tue_start time without time zone NOT NULL,
    tue_end time without time zone NOT NULL,
    tue_on smallint,
    wed_start time without time zone NOT NULL,
    wed_end time without time zone NOT NULL,
    wed_on smallint,
    thu_start time without time zone NOT NULL,
    thu_end time without time zone NOT NULL,
    thu_on smallint,
    fri_start time without time zone NOT NULL,
    fri_end time without time zone NOT NULL,
    fri_on smallint,
    sat_start time without time zone NOT NULL,
    sat_end time without time zone NOT NULL,
    sat_on smallint,
    remark character varying(999),
    update_time timestamp with time zone,
    area_id integer NOT NULL
);


ALTER TABLE public.acc_acctimezone OWNER TO postgres;

--
-- Name: acc_acctimezone_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.acc_acctimezone_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.acc_acctimezone_id_seq OWNER TO postgres;

--
-- Name: acc_acctimezone_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.acc_acctimezone_id_seq OWNED BY public.acc_acctimezone.id;


--
-- Name: accounts_adminbiodata; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.accounts_adminbiodata (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    bio_tmp text NOT NULL,
    bio_no integer,
    bio_index integer,
    bio_type integer NOT NULL,
    major_ver character varying(30) NOT NULL,
    minor_ver character varying(30),
    bio_format integer,
    valid boolean NOT NULL,
    duress boolean NOT NULL,
    admin_id integer NOT NULL
);


ALTER TABLE public.accounts_adminbiodata OWNER TO postgres;

--
-- Name: accounts_adminbiodata_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.accounts_adminbiodata_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.accounts_adminbiodata_id_seq OWNER TO postgres;

--
-- Name: accounts_adminbiodata_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.accounts_adminbiodata_id_seq OWNED BY public.accounts_adminbiodata.id;


--
-- Name: accounts_usernotification; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.accounts_usernotification (
    id integer NOT NULL,
    content text NOT NULL,
    send_time timestamp with time zone NOT NULL,
    read_time timestamp with time zone,
    status smallint NOT NULL,
    user_id integer NOT NULL,
    category integer,
    event integer
);


ALTER TABLE public.accounts_usernotification OWNER TO postgres;

--
-- Name: accounts_usernotification_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.accounts_usernotification_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.accounts_usernotification_id_seq OWNER TO postgres;

--
-- Name: accounts_usernotification_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.accounts_usernotification_id_seq OWNED BY public.accounts_usernotification.id;


--
-- Name: att_attcalclog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_attcalclog (
    id integer NOT NULL,
    dept_id integer,
    emp_id integer,
    start_date timestamp with time zone NOT NULL,
    end_date timestamp with time zone NOT NULL,
    update_time timestamp with time zone NOT NULL,
    log_type integer NOT NULL
);


ALTER TABLE public.att_attcalclog OWNER TO postgres;

--
-- Name: att_attcalclog_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_attcalclog_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_attcalclog_id_seq OWNER TO postgres;

--
-- Name: att_attcalclog_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_attcalclog_id_seq OWNED BY public.att_attcalclog.id;


--
-- Name: att_attcode; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_attcode (
    id integer NOT NULL,
    code character varying(20) NOT NULL,
    alias character varying(50) NOT NULL,
    display_format smallint NOT NULL,
    symbol character varying(20) NOT NULL,
    round_off smallint NOT NULL,
    min_val numeric(4,1) NOT NULL,
    symbol_only boolean NOT NULL,
    "order" smallint NOT NULL,
    color_setting character varying(30)
);


ALTER TABLE public.att_attcode OWNER TO postgres;

--
-- Name: att_attcode_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_attcode_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_attcode_id_seq OWNER TO postgres;

--
-- Name: att_attcode_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_attcode_id_seq OWNED BY public.att_attcode.id;


--
-- Name: att_attemployee; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_attemployee (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    enable_attendance boolean NOT NULL,
    enable_schedule boolean NOT NULL,
    enable_overtime boolean NOT NULL,
    enable_holiday boolean NOT NULL,
    emp_id integer NOT NULL,
    group_id integer,
    enable_compensatory boolean NOT NULL,
    ip_address inet
);


ALTER TABLE public.att_attemployee OWNER TO postgres;

--
-- Name: att_attemployee_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_attemployee_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_attemployee_id_seq OWNER TO postgres;

--
-- Name: att_attemployee_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_attemployee_id_seq OWNED BY public.att_attemployee.id;


--
-- Name: att_attgroup; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_attgroup (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    code character varying(50) NOT NULL,
    name character varying(100) NOT NULL
);


ALTER TABLE public.att_attgroup OWNER TO postgres;

--
-- Name: att_attgroup_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_attgroup_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_attgroup_id_seq OWNER TO postgres;

--
-- Name: att_attgroup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_attgroup_id_seq OWNED BY public.att_attgroup.id;


--
-- Name: att_attpolicy; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_attpolicy (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    use_ot smallint NOT NULL,
    weekend1 smallint NOT NULL,
    weekend2 smallint NOT NULL,
    start_of_week smallint NOT NULL,
    max_hrs numeric(4,1) NOT NULL,
    day_change time without time zone NOT NULL,
    paring_rule smallint NOT NULL,
    punch_period smallint NOT NULL,
    daily_ot boolean NOT NULL,
    daily_ot_rule uuid,
    weekly_ot boolean NOT NULL,
    weekly_ot_rule uuid,
    weekend_ot boolean NOT NULL,
    weekend_ot_rule uuid,
    holiday_ot boolean NOT NULL,
    holiday_ot_rule uuid,
    late_in2absence integer NOT NULL,
    early_out2absence integer NOT NULL,
    miss_in smallint NOT NULL,
    late_in_hrs integer NOT NULL,
    miss_out smallint NOT NULL,
    early_out_hrs integer NOT NULL,
    require_capture boolean NOT NULL,
    require_work_code boolean NOT NULL,
    require_punch_state boolean NOT NULL,
    email_send_time time without time zone NOT NULL,
    global_frequency smallint NOT NULL,
    global_send_day smallint NOT NULL,
    max_absent smallint NOT NULL,
    max_early_out smallint NOT NULL,
    max_late_in smallint NOT NULL,
    sending_day smallint NOT NULL,
    weekend1_color_setting character varying(30),
    weekend2_color_setting character varying(30),
    ot_pay_code_id integer,
    overtime_policy smallint NOT NULL,
    enable_compensatory boolean NOT NULL
);


ALTER TABLE public.att_attpolicy OWNER TO postgres;

--
-- Name: att_attpolicy_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_attpolicy_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_attpolicy_id_seq OWNER TO postgres;

--
-- Name: att_attpolicy_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_attpolicy_id_seq OWNED BY public.att_attpolicy.id;


--
-- Name: att_attreportsetting; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_attreportsetting (
    id integer NOT NULL,
    resign_emp smallint NOT NULL,
    short_date smallint NOT NULL,
    short_time smallint NOT NULL,
    filter_by_hire_date boolean NOT NULL,
    auto_calculate boolean NOT NULL
);


ALTER TABLE public.att_attreportsetting OWNER TO postgres;

--
-- Name: att_attreportsetting_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_attreportsetting_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_attreportsetting_id_seq OWNER TO postgres;

--
-- Name: att_attreportsetting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_attreportsetting_id_seq OWNED BY public.att_attreportsetting.id;


--
-- Name: att_attrule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_attrule (
    param_name character varying(20) NOT NULL,
    param_value text NOT NULL
);


ALTER TABLE public.att_attrule OWNER TO postgres;

--
-- Name: att_attschedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_attschedule (
    id integer NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    employee_id integer NOT NULL,
    shift_id integer NOT NULL
);


ALTER TABLE public.att_attschedule OWNER TO postgres;

--
-- Name: att_attschedule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_attschedule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_attschedule_id_seq OWNER TO postgres;

--
-- Name: att_attschedule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_attschedule_id_seq OWNED BY public.att_attschedule.id;


--
-- Name: att_attshift; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_attshift (
    id integer NOT NULL,
    alias character varying(50) NOT NULL,
    cycle_unit smallint NOT NULL,
    shift_cycle integer NOT NULL,
    work_weekend boolean NOT NULL,
    weekend_type smallint NOT NULL,
    work_day_off boolean NOT NULL,
    day_off_type smallint NOT NULL,
    auto_shift smallint NOT NULL,
    enable_ot_rule boolean NOT NULL,
    frequency smallint NOT NULL,
    ot_rule uuid
);


ALTER TABLE public.att_attshift OWNER TO postgres;

--
-- Name: att_attshift_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_attshift_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_attshift_id_seq OWNER TO postgres;

--
-- Name: att_attshift_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_attshift_id_seq OWNED BY public.att_attshift.id;


--
-- Name: att_breaktime; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_breaktime (
    id integer NOT NULL,
    alias character varying(50) NOT NULL,
    period_start time without time zone NOT NULL,
    duration integer NOT NULL,
    end_margin integer NOT NULL,
    func_key smallint NOT NULL,
    available_interval_type smallint NOT NULL,
    available_interval integer NOT NULL,
    multiple_punch smallint NOT NULL,
    calc_type smallint NOT NULL,
    minimum_duration integer,
    early_in smallint NOT NULL,
    late_in smallint NOT NULL,
    profit_rule boolean NOT NULL,
    min_early_in integer NOT NULL,
    loss_rule boolean NOT NULL,
    min_late_in integer NOT NULL,
    loss_code_id integer,
    profit_code_id integer
);


ALTER TABLE public.att_breaktime OWNER TO postgres;

--
-- Name: att_breaktime_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_breaktime_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_breaktime_id_seq OWNER TO postgres;

--
-- Name: att_breaktime_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_breaktime_id_seq OWNED BY public.att_breaktime.id;


--
-- Name: att_calculatelastdate; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_calculatelastdate (
    id integer NOT NULL,
    last_date timestamp with time zone NOT NULL
);


ALTER TABLE public.att_calculatelastdate OWNER TO postgres;

--
-- Name: att_calculatelastdate_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_calculatelastdate_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_calculatelastdate_id_seq OWNER TO postgres;

--
-- Name: att_calculatelastdate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_calculatelastdate_id_seq OWNED BY public.att_calculatelastdate.id;


--
-- Name: att_calculatetask; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_calculatetask (
    id integer NOT NULL,
    emp integer NOT NULL,
    start_date timestamp with time zone NOT NULL,
    end_date timestamp with time zone NOT NULL,
    event character varying(128)
);


ALTER TABLE public.att_calculatetask OWNER TO postgres;

--
-- Name: att_calculatetask_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_calculatetask_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_calculatetask_id_seq OWNER TO postgres;

--
-- Name: att_calculatetask_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_calculatetask_id_seq OWNED BY public.att_calculatetask.id;


--
-- Name: att_changeschedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_changeschedule (
    workflowinstance_ptr_id integer NOT NULL,
    att_date date NOT NULL,
    previous_timeinterval character varying(100),
    apply_time timestamp with time zone NOT NULL,
    apply_reason character varying(200),
    attachment character varying(100),
    timeinterval_id integer NOT NULL
);


ALTER TABLE public.att_changeschedule OWNER TO postgres;

--
-- Name: att_departmentpolicy; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_departmentpolicy (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    use_ot smallint NOT NULL,
    weekend1 smallint NOT NULL,
    weekend2 smallint NOT NULL,
    start_of_week smallint NOT NULL,
    max_hrs numeric(4,1) NOT NULL,
    day_change time without time zone NOT NULL,
    paring_rule smallint NOT NULL,
    punch_period smallint NOT NULL,
    daily_ot boolean NOT NULL,
    daily_ot_rule uuid,
    weekly_ot boolean NOT NULL,
    weekly_ot_rule uuid,
    weekend_ot boolean NOT NULL,
    weekend_ot_rule uuid,
    holiday_ot boolean NOT NULL,
    holiday_ot_rule uuid,
    late_in2absence integer NOT NULL,
    early_out2absence integer NOT NULL,
    miss_in smallint NOT NULL,
    late_in_hrs integer NOT NULL,
    miss_out smallint NOT NULL,
    early_out_hrs integer NOT NULL,
    require_capture boolean NOT NULL,
    require_work_code boolean NOT NULL,
    require_punch_state boolean NOT NULL,
    department_id integer NOT NULL,
    dept_frequency smallint NOT NULL,
    dept_send_day smallint NOT NULL,
    email_send_time time without time zone NOT NULL,
    max_absent smallint NOT NULL,
    max_early_out smallint NOT NULL,
    max_late_in smallint NOT NULL,
    sending_day smallint NOT NULL,
    weekend1_color_setting character varying(30),
    weekend2_color_setting character varying(30),
    ot_pay_code_id integer,
    overtime_policy smallint NOT NULL,
    enable_compensatory boolean NOT NULL
);


ALTER TABLE public.att_departmentpolicy OWNER TO postgres;

--
-- Name: att_departmentpolicy_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_departmentpolicy_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_departmentpolicy_id_seq OWNER TO postgres;

--
-- Name: att_departmentpolicy_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_departmentpolicy_id_seq OWNED BY public.att_departmentpolicy.id;


--
-- Name: att_departmentschedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_departmentschedule (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    department_id integer NOT NULL,
    shift_id integer NOT NULL
);


ALTER TABLE public.att_departmentschedule OWNER TO postgres;

--
-- Name: att_departmentschedule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_departmentschedule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_departmentschedule_id_seq OWNER TO postgres;

--
-- Name: att_departmentschedule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_departmentschedule_id_seq OWNED BY public.att_departmentschedule.id;


--
-- Name: att_deptattrule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_deptattrule (
    id integer NOT NULL,
    alias character varying(50) NOT NULL,
    rule text,
    department_id integer NOT NULL
);


ALTER TABLE public.att_deptattrule OWNER TO postgres;

--
-- Name: att_deptattrule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_deptattrule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_deptattrule_id_seq OWNER TO postgres;

--
-- Name: att_deptattrule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_deptattrule_id_seq OWNED BY public.att_deptattrule.id;


--
-- Name: att_grouppolicy; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_grouppolicy (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    use_ot smallint NOT NULL,
    weekend1 smallint NOT NULL,
    weekend2 smallint NOT NULL,
    start_of_week smallint NOT NULL,
    max_hrs numeric(4,1) NOT NULL,
    day_change time without time zone NOT NULL,
    paring_rule smallint NOT NULL,
    punch_period smallint NOT NULL,
    daily_ot boolean NOT NULL,
    daily_ot_rule uuid,
    weekly_ot boolean NOT NULL,
    weekly_ot_rule uuid,
    weekend_ot boolean NOT NULL,
    weekend_ot_rule uuid,
    holiday_ot boolean NOT NULL,
    holiday_ot_rule uuid,
    late_in2absence integer NOT NULL,
    early_out2absence integer NOT NULL,
    miss_in smallint NOT NULL,
    late_in_hrs integer NOT NULL,
    miss_out smallint NOT NULL,
    early_out_hrs integer NOT NULL,
    require_capture boolean NOT NULL,
    require_work_code boolean NOT NULL,
    require_punch_state boolean NOT NULL,
    group_id integer NOT NULL,
    email_send_time time without time zone NOT NULL,
    group_frequency smallint NOT NULL,
    group_send_day smallint NOT NULL,
    max_absent smallint NOT NULL,
    max_early_out smallint NOT NULL,
    max_late_in smallint NOT NULL,
    sending_day smallint NOT NULL,
    weekend1_color_setting character varying(30),
    weekend2_color_setting character varying(30),
    ot_pay_code_id integer,
    overtime_policy smallint NOT NULL,
    enable_compensatory boolean NOT NULL
);


ALTER TABLE public.att_grouppolicy OWNER TO postgres;

--
-- Name: att_grouppolicy_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_grouppolicy_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_grouppolicy_id_seq OWNER TO postgres;

--
-- Name: att_grouppolicy_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_grouppolicy_id_seq OWNED BY public.att_grouppolicy.id;


--
-- Name: att_groupschedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_groupschedule (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    group_id integer NOT NULL,
    shift_id integer
);


ALTER TABLE public.att_groupschedule OWNER TO postgres;

--
-- Name: att_groupschedule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_groupschedule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_groupschedule_id_seq OWNER TO postgres;

--
-- Name: att_groupschedule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_groupschedule_id_seq OWNED BY public.att_groupschedule.id;


--
-- Name: att_holiday; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_holiday (
    id integer NOT NULL,
    alias character varying(50) NOT NULL,
    start_date date NOT NULL,
    duration_day smallint NOT NULL,
    enable_ot_rule boolean NOT NULL,
    ot_rule uuid,
    department_id integer,
    att_group_id integer,
    color_setting character varying(30)
);


ALTER TABLE public.att_holiday OWNER TO postgres;

--
-- Name: att_holiday_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_holiday_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_holiday_id_seq OWNER TO postgres;

--
-- Name: att_holiday_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_holiday_id_seq OWNED BY public.att_holiday.id;


--
-- Name: att_leave; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_leave (
    workflowinstance_ptr_id integer NOT NULL,
    start_time timestamp with time zone NOT NULL,
    end_time timestamp with time zone NOT NULL,
    apply_reason text,
    apply_time timestamp with time zone NOT NULL,
    attachment character varying(100),
    pay_code_id integer,
    leave_day double precision NOT NULL
);


ALTER TABLE public.att_leave OWNER TO postgres;

--
-- Name: att_leavegroup; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_leavegroup (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    code character varying(50) NOT NULL,
    name character varying(100) NOT NULL
);


ALTER TABLE public.att_leavegroup OWNER TO postgres;

--
-- Name: att_leavegroup_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_leavegroup_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_leavegroup_id_seq OWNER TO postgres;

--
-- Name: att_leavegroup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_leavegroup_id_seq OWNED BY public.att_leavegroup.id;


--
-- Name: att_leavegroupdetail; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_leavegroupdetail (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    leave_type integer NOT NULL,
    allow_leave_day integer NOT NULL,
    min_leave_day double precision NOT NULL,
    deduct_holiday_day smallint NOT NULL,
    leave_entitlement integer,
    leave_interval integer NOT NULL,
    leave_distribution_time integer,
    start_day character varying(5) NOT NULL,
    set_hire_day smallint NOT NULL,
    allow_exceed_limit smallint NOT NULL,
    allow_balance smallint NOT NULL,
    max_balance integer,
    entitlement_detail character varying(999),
    leave_group_id integer NOT NULL,
    pay_code_id integer
);


ALTER TABLE public.att_leavegroupdetail OWNER TO postgres;

--
-- Name: att_leavegroupdetail_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_leavegroupdetail_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_leavegroupdetail_id_seq OWNER TO postgres;

--
-- Name: att_leavegroupdetail_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_leavegroupdetail_id_seq OWNED BY public.att_leavegroupdetail.id;


--
-- Name: att_leaveyearbalance; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_leaveyearbalance (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    leave_type integer,
    year integer,
    entitlement_days smallint,
    leave_day double precision,
    pre_balance smallint,
    employee_id integer NOT NULL,
    pay_code_id integer
);


ALTER TABLE public.att_leaveyearbalance OWNER TO postgres;

--
-- Name: att_leaveyearbalance_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_leaveyearbalance_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_leaveyearbalance_id_seq OWNER TO postgres;

--
-- Name: att_leaveyearbalance_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_leaveyearbalance_id_seq OWNED BY public.att_leaveyearbalance.id;


--
-- Name: att_manuallog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_manuallog (
    workflowinstance_ptr_id integer NOT NULL,
    punch_time timestamp with time zone NOT NULL,
    punch_state character varying(5) NOT NULL,
    work_code character varying(20),
    apply_reason text,
    apply_time timestamp with time zone NOT NULL,
    attachment character varying(100)
);


ALTER TABLE public.att_manuallog OWNER TO postgres;

--
-- Name: att_overtime; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_overtime (
    workflowinstance_ptr_id integer NOT NULL,
    overtime_type smallint NOT NULL,
    start_time timestamp with time zone NOT NULL,
    end_time timestamp with time zone NOT NULL,
    apply_reason text,
    apply_time timestamp with time zone NOT NULL,
    attachment character varying(100),
    pay_code_id integer
);


ALTER TABLE public.att_overtime OWNER TO postgres;

--
-- Name: att_overtimepolicy; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_overtimepolicy (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    mode smallint NOT NULL,
    hrs_from numeric(4,1) NOT NULL,
    hrs_to numeric(4,1) NOT NULL,
    master uuid NOT NULL,
    overnight_pay_code_id integer,
    pay_code_id integer
);


ALTER TABLE public.att_overtimepolicy OWNER TO postgres;

--
-- Name: att_overtimepolicy_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_overtimepolicy_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_overtimepolicy_id_seq OWNER TO postgres;

--
-- Name: att_overtimepolicy_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_overtimepolicy_id_seq OWNED BY public.att_overtimepolicy.id;


--
-- Name: att_paycode; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_paycode (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    code character varying(20) NOT NULL,
    name character varying(50) NOT NULL,
    code_type smallint NOT NULL,
    tag smallint,
    fixed_code smallint,
    is_work boolean NOT NULL,
    fixed_hours numeric(8,2) NOT NULL,
    is_paid boolean NOT NULL,
    is_benefit boolean NOT NULL,
    round_off smallint NOT NULL,
    min_val numeric(4,1) NOT NULL,
    display_format smallint NOT NULL,
    symbol character varying(20),
    display_order smallint NOT NULL,
    "desc" text,
    is_display boolean NOT NULL,
    is_default boolean NOT NULL,
    color_setting character varying(30)
);


ALTER TABLE public.att_paycode OWNER TO postgres;

--
-- Name: att_paycode_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_paycode_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_paycode_id_seq OWNER TO postgres;

--
-- Name: att_paycode_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_paycode_id_seq OWNED BY public.att_paycode.id;


--
-- Name: att_payloadattcode; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadattcode (
    id uuid NOT NULL,
    att_date date NOT NULL,
    week integer NOT NULL,
    weekday integer NOT NULL,
    att_code_alias character varying(50) NOT NULL,
    att_code_symbol character varying(20),
    duration integer NOT NULL,
    workday numeric(4,1) NOT NULL,
    hours numeric(6,1) NOT NULL,
    minutes numeric(8,1) NOT NULL,
    is_weekly boolean NOT NULL,
    att_code_id integer NOT NULL,
    emp_id integer NOT NULL,
    shift_id integer,
    time_card_id uuid
);


ALTER TABLE public.att_payloadattcode OWNER TO postgres;

--
-- Name: att_payloadbase; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadbase (
    uuid character varying(36) NOT NULL,
    att_date date,
    weekday smallint,
    check_in timestamp with time zone,
    check_out timestamp with time zone,
    duration integer,
    duty_duration integer,
    work_day double precision NOT NULL,
    clock_in timestamp with time zone,
    clock_out timestamp with time zone,
    total_time integer,
    duty_worked integer,
    actual_worked integer,
    unscheduled integer,
    remaining integer,
    total_worked integer,
    late integer,
    early_leave integer,
    short integer,
    absent integer,
    leave integer,
    exception character varying(50),
    day_off smallint NOT NULL,
    break_time_id character varying(36),
    emp_id integer NOT NULL,
    overtime_id character varying(36),
    timetable_id integer
);


ALTER TABLE public.att_payloadbase OWNER TO postgres;

--
-- Name: att_payloadbreak; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadbreak (
    uuid character varying(36) NOT NULL,
    break_out timestamp with time zone,
    break_in timestamp with time zone,
    duration integer,
    taken integer,
    actual_duration integer,
    early_in integer,
    late_in integer,
    late integer,
    early_leave integer,
    absent integer,
    work_time integer,
    overtime integer,
    weekend_ot integer,
    holiday_ot integer
);


ALTER TABLE public.att_payloadbreak OWNER TO postgres;

--
-- Name: att_payloadeffectpunch; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadeffectpunch (
    id uuid NOT NULL,
    att_date date NOT NULL,
    punch_datetime timestamp with time zone NOT NULL,
    punch_date date NOT NULL,
    punch_time time without time zone NOT NULL,
    week smallint NOT NULL,
    weekday smallint NOT NULL,
    work_code character varying(20) NOT NULL,
    punch_state character varying(5) NOT NULL,
    adjust_state character varying(5) NOT NULL,
    emp_id integer NOT NULL,
    time_card_id uuid,
    trans_id integer NOT NULL
);


ALTER TABLE public.att_payloadeffectpunch OWNER TO postgres;

--
-- Name: att_payloadexception; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadexception (
    uuid character varying(36) NOT NULL,
    start_time timestamp with time zone NOT NULL,
    end_time timestamp with time zone NOT NULL,
    duration integer,
    days double precision,
    data_type smallint NOT NULL,
    description character varying(50),
    item_id integer,
    skd_id character varying(36)
);


ALTER TABLE public.att_payloadexception OWNER TO postgres;

--
-- Name: att_payloadmulpunchset; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadmulpunchset (
    id integer NOT NULL,
    att_date date NOT NULL,
    weekday smallint,
    data_index smallint NOT NULL,
    clock_in timestamp with time zone,
    in_id integer,
    clock_out timestamp with time zone,
    out_id integer,
    total_time integer,
    worked_time integer,
    data_type smallint NOT NULL,
    emp_id integer NOT NULL,
    timetable_id integer
);


ALTER TABLE public.att_payloadmulpunchset OWNER TO postgres;

--
-- Name: att_payloadmulpunchset_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_payloadmulpunchset_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_payloadmulpunchset_id_seq OWNER TO postgres;

--
-- Name: att_payloadmulpunchset_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_payloadmulpunchset_id_seq OWNED BY public.att_payloadmulpunchset.id;


--
-- Name: att_payloadovertime; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadovertime (
    uuid character varying(36) NOT NULL,
    normal_wt integer,
    normal_ot integer,
    weekend_ot integer,
    holiday_ot integer,
    ot_lv1 integer,
    ot_lv2 integer,
    ot_lv3 integer,
    total_ot integer
);


ALTER TABLE public.att_payloadovertime OWNER TO postgres;

--
-- Name: att_payloadparing; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadparing (
    id uuid NOT NULL,
    stamp bigint NOT NULL,
    att_date date NOT NULL,
    week smallint NOT NULL,
    weekday smallint NOT NULL,
    data_type smallint NOT NULL,
    clock_in timestamp with time zone,
    in_date date,
    in_time time without time zone,
    clock_out timestamp with time zone,
    out_date date,
    out_time time without time zone,
    duration integer NOT NULL,
    worked_duration integer NOT NULL,
    data_index integer NOT NULL,
    workday numeric(4,1) NOT NULL,
    emp_id integer NOT NULL,
    in_trans_id integer,
    out_trans_id integer,
    pay_code_id integer,
    time_card_id uuid
);


ALTER TABLE public.att_payloadparing OWNER TO postgres;

--
-- Name: att_payloadpaycode; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadpaycode (
    id uuid NOT NULL,
    att_date date NOT NULL,
    week integer NOT NULL,
    weekday integer NOT NULL,
    pay_code_alias character varying(50) NOT NULL,
    pay_code_symbol character varying(20),
    duration integer NOT NULL,
    workday numeric(4,1) NOT NULL,
    hours numeric(6,1) NOT NULL,
    minutes numeric(8,1) NOT NULL,
    is_weekly boolean NOT NULL,
    emp_id integer NOT NULL,
    pay_code_id integer NOT NULL,
    shift_id integer,
    time_card_id uuid,
    is_exception smallint NOT NULL,
    year integer NOT NULL
);


ALTER TABLE public.att_payloadpaycode OWNER TO postgres;

--
-- Name: att_payloadpunch; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadpunch (
    uuid character varying(36) NOT NULL,
    att_date date,
    correct_state character varying(3),
    emp_id integer NOT NULL,
    orig_id integer,
    skd_id character varying(36)
);


ALTER TABLE public.att_payloadpunch OWNER TO postgres;

--
-- Name: att_payloadtimecard; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_payloadtimecard (
    id uuid NOT NULL,
    att_date date NOT NULL,
    week integer NOT NULL,
    weekday integer NOT NULL,
    date_type smallint NOT NULL,
    time_table_alias character varying(50) NOT NULL,
    check_in timestamp with time zone NOT NULL,
    check_out timestamp with time zone NOT NULL,
    work_day numeric(4,1) NOT NULL,
    clock_in timestamp with time zone,
    clock_out timestamp with time zone,
    break_out timestamp with time zone,
    break_in timestamp with time zone,
    lock_down boolean NOT NULL,
    emp_id integer NOT NULL,
    time_table_id integer,
    present smallint NOT NULL,
    full_attendance smallint NOT NULL,
    payload text
);


ALTER TABLE public.att_payloadtimecard OWNER TO postgres;

--
-- Name: att_reportparam; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_reportparam (
    param_name character varying(20) NOT NULL,
    param_value text NOT NULL
);


ALTER TABLE public.att_reportparam OWNER TO postgres;

--
-- Name: att_reporttemplate; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_reporttemplate (
    id integer NOT NULL,
    report character varying(50) NOT NULL,
    template_name character varying(50) NOT NULL,
    template_value text NOT NULL,
    is_share boolean NOT NULL,
    is_auto_export boolean NOT NULL,
    builder_id integer,
    change_time timestamp with time zone,
    change_user character varying(150),
    create_time timestamp with time zone,
    create_user character varying(150),
    fixed_date_period boolean NOT NULL,
    language character varying(10) NOT NULL,
    status smallint NOT NULL,
    employee_id integer
);


ALTER TABLE public.att_reporttemplate OWNER TO postgres;

--
-- Name: att_reporttemplate_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_reporttemplate_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_reporttemplate_id_seq OWNER TO postgres;

--
-- Name: att_reporttemplate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_reporttemplate_id_seq OWNED BY public.att_reporttemplate.id;


--
-- Name: att_shiftdetail; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_shiftdetail (
    id integer NOT NULL,
    in_time time without time zone NOT NULL,
    out_time time without time zone NOT NULL,
    day_index integer NOT NULL,
    shift_id integer NOT NULL,
    time_interval_id integer NOT NULL
);


ALTER TABLE public.att_shiftdetail OWNER TO postgres;

--
-- Name: att_shiftdetail_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_shiftdetail_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_shiftdetail_id_seq OWNER TO postgres;

--
-- Name: att_shiftdetail_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_shiftdetail_id_seq OWNED BY public.att_shiftdetail.id;


--
-- Name: att_temporaryschedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_temporaryschedule (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    att_date date NOT NULL,
    employee_id integer NOT NULL,
    time_interval_id integer
);


ALTER TABLE public.att_temporaryschedule OWNER TO postgres;

--
-- Name: att_temporaryschedule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_temporaryschedule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_temporaryschedule_id_seq OWNER TO postgres;

--
-- Name: att_temporaryschedule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_temporaryschedule_id_seq OWNED BY public.att_temporaryschedule.id;


--
-- Name: att_tempschedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_tempschedule (
    id integer NOT NULL,
    att_date date,
    start_time timestamp with time zone NOT NULL,
    end_time timestamp with time zone NOT NULL,
    rule_flag smallint NOT NULL,
    work_type smallint NOT NULL,
    employee_id integer NOT NULL,
    time_interval_id integer
);


ALTER TABLE public.att_tempschedule OWNER TO postgres;

--
-- Name: att_tempschedule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_tempschedule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_tempschedule_id_seq OWNER TO postgres;

--
-- Name: att_tempschedule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_tempschedule_id_seq OWNED BY public.att_tempschedule.id;


--
-- Name: att_timeinterval; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_timeinterval (
    id integer NOT NULL,
    alias character varying(50) NOT NULL,
    use_mode smallint NOT NULL,
    in_time time without time zone NOT NULL,
    in_ahead_margin integer NOT NULL,
    in_above_margin integer NOT NULL,
    out_ahead_margin integer NOT NULL,
    out_above_margin integer NOT NULL,
    duration integer NOT NULL,
    in_required smallint NOT NULL,
    out_required smallint NOT NULL,
    allow_late integer NOT NULL,
    allow_leave_early integer NOT NULL,
    work_day double precision NOT NULL,
    early_in smallint NOT NULL,
    min_early_in integer NOT NULL,
    late_out smallint NOT NULL,
    min_late_out integer NOT NULL,
    overtime_lv smallint NOT NULL,
    overtime_lv1 smallint NOT NULL,
    overtime_lv2 smallint NOT NULL,
    overtime_lv3 smallint NOT NULL,
    multiple_punch smallint NOT NULL,
    available_interval_type smallint NOT NULL,
    available_interval integer NOT NULL,
    work_time_duration integer NOT NULL,
    func_key smallint NOT NULL,
    work_type smallint NOT NULL,
    day_change time without time zone NOT NULL,
    enable_early_in boolean NOT NULL,
    enable_late_out boolean NOT NULL,
    enable_overtime boolean NOT NULL,
    ot_rule uuid,
    color_setting character varying(30),
    enable_max_ot_limit boolean NOT NULL,
    max_ot_limit integer NOT NULL,
    count_early_in_interval boolean NOT NULL,
    count_late_out_interval boolean NOT NULL,
    ot_pay_code_id integer,
    overtime_policy smallint NOT NULL
);


ALTER TABLE public.att_timeinterval OWNER TO postgres;

--
-- Name: att_timeinterval_break_time; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_timeinterval_break_time (
    id integer NOT NULL,
    timeinterval_id integer NOT NULL,
    breaktime_id integer NOT NULL
);


ALTER TABLE public.att_timeinterval_break_time OWNER TO postgres;

--
-- Name: att_timeinterval_break_time_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_timeinterval_break_time_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_timeinterval_break_time_id_seq OWNER TO postgres;

--
-- Name: att_timeinterval_break_time_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_timeinterval_break_time_id_seq OWNED BY public.att_timeinterval_break_time.id;


--
-- Name: att_timeinterval_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.att_timeinterval_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.att_timeinterval_id_seq OWNER TO postgres;

--
-- Name: att_timeinterval_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.att_timeinterval_id_seq OWNED BY public.att_timeinterval.id;


--
-- Name: att_training; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_training (
    workflowinstance_ptr_id integer NOT NULL,
    start_time timestamp with time zone NOT NULL,
    end_time timestamp with time zone NOT NULL,
    apply_time timestamp with time zone NOT NULL,
    apply_reason text,
    attachment character varying(100),
    pay_code_id integer
);


ALTER TABLE public.att_training OWNER TO postgres;

--
-- Name: att_webpunch; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.att_webpunch (
    workflowinstance_ptr_id integer NOT NULL,
    punch_time timestamp with time zone NOT NULL,
    punch_state character varying(5) NOT NULL,
    work_code character varying(20),
    apply_reason text,
    apply_time timestamp with time zone NOT NULL,
    verify_type integer NOT NULL
);


ALTER TABLE public.att_webpunch OWNER TO postgres;

--
-- Name: attparam; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.attparam (
    id integer NOT NULL,
    paraname character varying(30) NOT NULL,
    paratype character varying(10),
    paravalue character varying(250)
);


ALTER TABLE public.attparam OWNER TO postgres;

--
-- Name: attparam_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.attparam_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.attparam_id_seq OWNER TO postgres;

--
-- Name: attparam_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.attparam_id_seq OWNED BY public.attparam.id;


--
-- Name: auth_group; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.auth_group (
    id integer NOT NULL,
    name character varying(80) NOT NULL
);


ALTER TABLE public.auth_group OWNER TO postgres;

--
-- Name: auth_group_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.auth_group_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_group_id_seq OWNER TO postgres;

--
-- Name: auth_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.auth_group_id_seq OWNED BY public.auth_group.id;


--
-- Name: auth_group_permissions; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.auth_group_permissions (
    id integer NOT NULL,
    group_id integer NOT NULL,
    permission_id integer NOT NULL
);


ALTER TABLE public.auth_group_permissions OWNER TO postgres;

--
-- Name: auth_group_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.auth_group_permissions_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_group_permissions_id_seq OWNER TO postgres;

--
-- Name: auth_group_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.auth_group_permissions_id_seq OWNED BY public.auth_group_permissions.id;


--
-- Name: auth_permission; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.auth_permission (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    content_type_id integer NOT NULL,
    codename character varying(100) NOT NULL
);


ALTER TABLE public.auth_permission OWNER TO postgres;

--
-- Name: auth_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.auth_permission_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_permission_id_seq OWNER TO postgres;

--
-- Name: auth_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.auth_permission_id_seq OWNED BY public.auth_permission.id;


--
-- Name: auth_user; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.auth_user (
    id integer NOT NULL,
    username character varying(30) NOT NULL,
    password character varying(128) NOT NULL,
    update_time timestamp with time zone,
    first_name character varying(30) NOT NULL,
    last_name character varying(30) NOT NULL,
    emp_pin character varying(30),
    email character varying(254) NOT NULL,
    tele_phone character varying(30),
    auth_time_dept integer,
    login_id integer,
    login_type integer,
    login_count integer,
    is_staff boolean NOT NULL,
    is_active boolean NOT NULL,
    is_superuser boolean NOT NULL,
    is_public boolean NOT NULL,
    can_manage_all_dept boolean NOT NULL,
    del_flag integer,
    date_joined timestamp with time zone NOT NULL,
    last_login timestamp with time zone,
    session_key character varying(32),
    login_ip character varying(32),
    photo character varying(200),
    assign_company integer
);


ALTER TABLE public.auth_user OWNER TO postgres;

--
-- Name: auth_user_auth_area; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.auth_user_auth_area (
    id integer NOT NULL,
    myuser_id integer NOT NULL,
    area_id integer NOT NULL
);


ALTER TABLE public.auth_user_auth_area OWNER TO postgres;

--
-- Name: auth_user_auth_area_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.auth_user_auth_area_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_user_auth_area_id_seq OWNER TO postgres;

--
-- Name: auth_user_auth_area_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.auth_user_auth_area_id_seq OWNED BY public.auth_user_auth_area.id;


--
-- Name: auth_user_auth_dept; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.auth_user_auth_dept (
    id integer NOT NULL,
    myuser_id integer NOT NULL,
    department_id integer NOT NULL
);


ALTER TABLE public.auth_user_auth_dept OWNER TO postgres;

--
-- Name: auth_user_auth_dept_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.auth_user_auth_dept_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_user_auth_dept_id_seq OWNER TO postgres;

--
-- Name: auth_user_auth_dept_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.auth_user_auth_dept_id_seq OWNED BY public.auth_user_auth_dept.id;


--
-- Name: auth_user_groups; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.auth_user_groups (
    id integer NOT NULL,
    myuser_id integer NOT NULL,
    group_id integer NOT NULL
);


ALTER TABLE public.auth_user_groups OWNER TO postgres;

--
-- Name: auth_user_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.auth_user_groups_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_user_groups_id_seq OWNER TO postgres;

--
-- Name: auth_user_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.auth_user_groups_id_seq OWNED BY public.auth_user_groups.id;


--
-- Name: auth_user_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.auth_user_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_user_id_seq OWNER TO postgres;

--
-- Name: auth_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.auth_user_id_seq OWNED BY public.auth_user.id;


--
-- Name: auth_user_profile; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.auth_user_profile (
    id integer NOT NULL,
    login_name character varying(30) NOT NULL,
    pin_tabs text NOT NULL,
    disabled_fields text NOT NULL,
    column_order text NOT NULL,
    preferences text NOT NULL,
    pwd_update_time timestamp with time zone,
    user_id integer NOT NULL
);


ALTER TABLE public.auth_user_profile OWNER TO postgres;

--
-- Name: auth_user_profile_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.auth_user_profile_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_user_profile_id_seq OWNER TO postgres;

--
-- Name: auth_user_profile_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.auth_user_profile_id_seq OWNED BY public.auth_user_profile.id;


--
-- Name: auth_user_user_permissions; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.auth_user_user_permissions (
    id integer NOT NULL,
    myuser_id integer NOT NULL,
    permission_id integer NOT NULL
);


ALTER TABLE public.auth_user_user_permissions OWNER TO postgres;

--
-- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.auth_user_user_permissions_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auth_user_user_permissions_id_seq OWNER TO postgres;

--
-- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.auth_user_user_permissions_id_seq OWNED BY public.auth_user_user_permissions.id;


--
-- Name: authtoken_token; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.authtoken_token (
    key character varying(40) NOT NULL,
    created timestamp with time zone NOT NULL,
    user_id integer NOT NULL
);


ALTER TABLE public.authtoken_token OWNER TO postgres;

--
-- Name: base_adminlog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_adminlog (
    id integer NOT NULL,
    action character varying(50) NOT NULL,
    targets text,
    targets_repr text,
    action_status smallint NOT NULL,
    description text,
    ip_address inet,
    can_routable boolean NOT NULL,
    op_time timestamp with time zone NOT NULL,
    content_type_id integer,
    user_id integer NOT NULL
);


ALTER TABLE public.base_adminlog OWNER TO postgres;

--
-- Name: base_adminlog_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_adminlog_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_adminlog_id_seq OWNER TO postgres;

--
-- Name: base_adminlog_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_adminlog_id_seq OWNED BY public.base_adminlog.id;


--
-- Name: base_attparamdepts; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_attparamdepts (
    id integer NOT NULL,
    rulename character varying(40) NOT NULL,
    deptid integer NOT NULL,
    operator character varying(20),
    optime timestamp with time zone
);


ALTER TABLE public.base_attparamdepts OWNER TO postgres;

--
-- Name: base_attparamdepts_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_attparamdepts_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_attparamdepts_id_seq OWNER TO postgres;

--
-- Name: base_attparamdepts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_attparamdepts_id_seq OWNED BY public.base_attparamdepts.id;


--
-- Name: base_autoattexporttask; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_autoattexporttask (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    task_code character varying(30) NOT NULL,
    task_name character varying(30) NOT NULL,
    params text,
    enable boolean NOT NULL,
    process_time timestamp with time zone
);


ALTER TABLE public.base_autoattexporttask OWNER TO postgres;

--
-- Name: base_autoattexporttask_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_autoattexporttask_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_autoattexporttask_id_seq OWNER TO postgres;

--
-- Name: base_autoattexporttask_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_autoattexporttask_id_seq OWNED BY public.base_autoattexporttask.id;


--
-- Name: base_autoexporttask; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_autoexporttask (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    task_code character varying(30) NOT NULL,
    task_name character varying(30) NOT NULL,
    params text,
    enable boolean NOT NULL,
    process_time timestamp with time zone
);


ALTER TABLE public.base_autoexporttask OWNER TO postgres;

--
-- Name: base_autoexporttask_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_autoexporttask_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_autoexporttask_id_seq OWNER TO postgres;

--
-- Name: base_autoexporttask_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_autoexporttask_id_seq OWNED BY public.base_autoexporttask.id;


--
-- Name: base_autoimporttask; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_autoimporttask (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    task_code character varying(30) NOT NULL,
    task_name character varying(30) NOT NULL,
    params text,
    enable boolean NOT NULL,
    process_time timestamp with time zone,
    company_id integer NOT NULL
);


ALTER TABLE public.base_autoimporttask OWNER TO postgres;

--
-- Name: base_autoimporttask_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_autoimporttask_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_autoimporttask_id_seq OWNER TO postgres;

--
-- Name: base_autoimporttask_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_autoimporttask_id_seq OWNED BY public.base_autoimporttask.id;


--
-- Name: base_bookmark; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_bookmark (
    id integer NOT NULL,
    title character varying(128) NOT NULL,
    filters character varying(1000) NOT NULL,
    is_share boolean NOT NULL,
    time_saved timestamp with time zone NOT NULL,
    content_type_id integer NOT NULL,
    user_id integer
);


ALTER TABLE public.base_bookmark OWNER TO postgres;

--
-- Name: base_bookmark_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_bookmark_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_bookmark_id_seq OWNER TO postgres;

--
-- Name: base_bookmark_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_bookmark_id_seq OWNED BY public.base_bookmark.id;


--
-- Name: base_dbbackuplog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_dbbackuplog (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    db_type character varying(50) NOT NULL,
    db_name character varying(50) NOT NULL,
    operator character varying(50),
    backup_file character varying(100) NOT NULL,
    backup_time timestamp with time zone NOT NULL,
    backup_status smallint NOT NULL,
    remark text
);


ALTER TABLE public.base_dbbackuplog OWNER TO postgres;

--
-- Name: base_dbbackuplog_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_dbbackuplog_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_dbbackuplog_id_seq OWNER TO postgres;

--
-- Name: base_dbbackuplog_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_dbbackuplog_id_seq OWNED BY public.base_dbbackuplog.id;


--
-- Name: base_emailtemplate; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_emailtemplate (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    category integer NOT NULL,
    sub_category integer NOT NULL,
    event integer NOT NULL,
    receiver integer NOT NULL,
    subject character varying(100),
    template text NOT NULL,
    enable boolean NOT NULL
);


ALTER TABLE public.base_emailtemplate OWNER TO postgres;

--
-- Name: base_emailtemplate_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_emailtemplate_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_emailtemplate_id_seq OWNER TO postgres;

--
-- Name: base_emailtemplate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_emailtemplate_id_seq OWNED BY public.base_emailtemplate.id;


--
-- Name: base_eventalertsetting; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_eventalertsetting (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    event_id integer NOT NULL,
    event character varying(50) NOT NULL,
    module character varying(50) NOT NULL,
    sub_module character varying(50) NOT NULL,
    email_alert boolean NOT NULL,
    app_alert boolean NOT NULL,
    sms_alert boolean NOT NULL,
    whatapp_alert boolean NOT NULL
);


ALTER TABLE public.base_eventalertsetting OWNER TO postgres;

--
-- Name: base_eventalertsetting_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_eventalertsetting_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_eventalertsetting_id_seq OWNER TO postgres;

--
-- Name: base_eventalertsetting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_eventalertsetting_id_seq OWNED BY public.base_eventalertsetting.id;


--
-- Name: base_linenotifysetting; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_linenotifysetting (
    id integer NOT NULL,
    include_sub_department integer,
    line_notify_token character varying(200),
    message_type integer,
    message_head character varying(100),
    message_tail character varying(100),
    push_time time without time zone,
    is_valid integer,
    remark character varying(200),
    line_notify_dept_id integer
);


ALTER TABLE public.base_linenotifysetting OWNER TO postgres;

--
-- Name: base_linenotifysetting_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_linenotifysetting_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_linenotifysetting_id_seq OWNER TO postgres;

--
-- Name: base_linenotifysetting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_linenotifysetting_id_seq OWNED BY public.base_linenotifysetting.id;


--
-- Name: base_securitypolicy; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_securitypolicy (
    id integer NOT NULL,
    single_login boolean NOT NULL,
    security_code boolean NOT NULL,
    code_length integer NOT NULL,
    valid_duration integer NOT NULL,
    failed_locked boolean NOT NULL,
    lock_failed_count integer NOT NULL,
    lock_duration integer NOT NULL,
    enforce_pwd_change boolean NOT NULL,
    enforce_pwd_expiration boolean NOT NULL,
    validity_period integer NOT NULL,
    password_level smallint NOT NULL,
    is_default boolean NOT NULL,
    app_single_user_login boolean NOT NULL,
    session_timeout integer NOT NULL,
    export_encryption boolean NOT NULL,
    export_encryption_password character varying(20)
);


ALTER TABLE public.base_securitypolicy OWNER TO postgres;

--
-- Name: base_securitypolicy_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_securitypolicy_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_securitypolicy_id_seq OWNER TO postgres;

--
-- Name: base_securitypolicy_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_securitypolicy_id_seq OWNED BY public.base_securitypolicy.id;


--
-- Name: base_sendemail; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_sendemail (
    id integer NOT NULL,
    purpose integer NOT NULL,
    email_to text NOT NULL,
    email_cc text,
    email_bcc text,
    email_subject character varying(40) NOT NULL,
    email_content text,
    send_time timestamp with time zone,
    send_status smallint
);


ALTER TABLE public.base_sendemail OWNER TO postgres;

--
-- Name: base_sendemail_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_sendemail_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_sendemail_id_seq OWNER TO postgres;

--
-- Name: base_sendemail_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_sendemail_id_seq OWNED BY public.base_sendemail.id;


--
-- Name: base_sftpsetting; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_sftpsetting (
    id integer NOT NULL,
    host character varying(39) NOT NULL,
    port integer NOT NULL,
    user_name character varying(30) NOT NULL,
    user_password character varying(128),
    user_key text,
    is_sftp smallint NOT NULL
);


ALTER TABLE public.base_sftpsetting OWNER TO postgres;

--
-- Name: base_sftpsetting_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_sftpsetting_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_sftpsetting_id_seq OWNER TO postgres;

--
-- Name: base_sftpsetting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_sftpsetting_id_seq OWNED BY public.base_sftpsetting.id;


--
-- Name: base_sysparam; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_sysparam (
    id integer NOT NULL,
    para_name character varying(30) NOT NULL,
    para_type character varying(10),
    para_value character varying(250)
);


ALTER TABLE public.base_sysparam OWNER TO postgres;

--
-- Name: base_sysparam_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_sysparam_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_sysparam_id_seq OWNER TO postgres;

--
-- Name: base_sysparam_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_sysparam_id_seq OWNED BY public.base_sysparam.id;


--
-- Name: base_sysparamdept; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_sysparamdept (
    id integer NOT NULL,
    rule_name character varying(40) NOT NULL,
    dept_id integer NOT NULL,
    operator character varying(20),
    op_time timestamp with time zone
);


ALTER TABLE public.base_sysparamdept OWNER TO postgres;

--
-- Name: base_sysparamdept_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_sysparamdept_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_sysparamdept_id_seq OWNER TO postgres;

--
-- Name: base_sysparamdept_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_sysparamdept_id_seq OWNED BY public.base_sysparamdept.id;


--
-- Name: base_systemlog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_systemlog (
    id integer NOT NULL,
    execute_time timestamp with time zone NOT NULL,
    operation smallint NOT NULL,
    execute_status smallint NOT NULL,
    description text
);


ALTER TABLE public.base_systemlog OWNER TO postgres;

--
-- Name: base_systemlog_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_systemlog_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_systemlog_id_seq OWNER TO postgres;

--
-- Name: base_systemlog_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_systemlog_id_seq OWNED BY public.base_systemlog.id;


--
-- Name: base_systemsetting; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.base_systemsetting (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    name character varying(30) NOT NULL,
    value text NOT NULL
);


ALTER TABLE public.base_systemsetting OWNER TO postgres;

--
-- Name: base_systemsetting_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.base_systemsetting_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.base_systemsetting_id_seq OWNER TO postgres;

--
-- Name: base_systemsetting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.base_systemsetting_id_seq OWNED BY public.base_systemsetting.id;


--
-- Name: django_admin_log; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.django_admin_log (
    id integer NOT NULL,
    action_time timestamp with time zone NOT NULL,
    object_id text,
    object_repr character varying(200) NOT NULL,
    action_flag smallint NOT NULL,
    change_message text NOT NULL,
    content_type_id integer,
    user_id integer NOT NULL,
    CONSTRAINT django_admin_log_action_flag_check CHECK ((action_flag >= 0))
);


ALTER TABLE public.django_admin_log OWNER TO postgres;

--
-- Name: django_admin_log_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.django_admin_log_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_admin_log_id_seq OWNER TO postgres;

--
-- Name: django_admin_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.django_admin_log_id_seq OWNED BY public.django_admin_log.id;


--
-- Name: django_celery_beat_clockedschedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.django_celery_beat_clockedschedule (
    id integer NOT NULL,
    clocked_time timestamp with time zone NOT NULL,
    enabled boolean NOT NULL
);


ALTER TABLE public.django_celery_beat_clockedschedule OWNER TO postgres;

--
-- Name: django_celery_beat_clockedschedule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.django_celery_beat_clockedschedule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_celery_beat_clockedschedule_id_seq OWNER TO postgres;

--
-- Name: django_celery_beat_clockedschedule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.django_celery_beat_clockedschedule_id_seq OWNED BY public.django_celery_beat_clockedschedule.id;


--
-- Name: django_celery_beat_crontabschedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.django_celery_beat_crontabschedule (
    id integer NOT NULL,
    minute character varying(240) NOT NULL,
    hour character varying(96) NOT NULL,
    day_of_week character varying(64) NOT NULL,
    day_of_month character varying(124) NOT NULL,
    month_of_year character varying(64) NOT NULL,
    timezone character varying(63) NOT NULL
);


ALTER TABLE public.django_celery_beat_crontabschedule OWNER TO postgres;

--
-- Name: django_celery_beat_crontabschedule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.django_celery_beat_crontabschedule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_celery_beat_crontabschedule_id_seq OWNER TO postgres;

--
-- Name: django_celery_beat_crontabschedule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.django_celery_beat_crontabschedule_id_seq OWNED BY public.django_celery_beat_crontabschedule.id;


--
-- Name: django_celery_beat_intervalschedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.django_celery_beat_intervalschedule (
    id integer NOT NULL,
    every integer NOT NULL,
    period character varying(24) NOT NULL
);


ALTER TABLE public.django_celery_beat_intervalschedule OWNER TO postgres;

--
-- Name: django_celery_beat_intervalschedule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.django_celery_beat_intervalschedule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_celery_beat_intervalschedule_id_seq OWNER TO postgres;

--
-- Name: django_celery_beat_intervalschedule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.django_celery_beat_intervalschedule_id_seq OWNED BY public.django_celery_beat_intervalschedule.id;


--
-- Name: django_celery_beat_periodictask; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.django_celery_beat_periodictask (
    id integer NOT NULL,
    name character varying(200) NOT NULL,
    task character varying(200) NOT NULL,
    args text NOT NULL,
    kwargs text NOT NULL,
    queue character varying(200),
    exchange character varying(200),
    routing_key character varying(200),
    expires timestamp with time zone,
    enabled boolean NOT NULL,
    last_run_at timestamp with time zone,
    total_run_count integer NOT NULL,
    date_changed timestamp with time zone NOT NULL,
    description text NOT NULL,
    crontab_id integer,
    interval_id integer,
    solar_id integer,
    one_off boolean NOT NULL,
    start_time timestamp with time zone,
    priority integer,
    headers text NOT NULL,
    clocked_id integer,
    CONSTRAINT django_celery_beat_periodictask_priority_check CHECK ((priority >= 0)),
    CONSTRAINT django_celery_beat_periodictask_total_run_count_check CHECK ((total_run_count >= 0))
);


ALTER TABLE public.django_celery_beat_periodictask OWNER TO postgres;

--
-- Name: django_celery_beat_periodictask_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.django_celery_beat_periodictask_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_celery_beat_periodictask_id_seq OWNER TO postgres;

--
-- Name: django_celery_beat_periodictask_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.django_celery_beat_periodictask_id_seq OWNED BY public.django_celery_beat_periodictask.id;


--
-- Name: django_celery_beat_periodictasks; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.django_celery_beat_periodictasks (
    ident smallint NOT NULL,
    last_update timestamp with time zone NOT NULL
);


ALTER TABLE public.django_celery_beat_periodictasks OWNER TO postgres;

--
-- Name: django_celery_beat_solarschedule; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.django_celery_beat_solarschedule (
    id integer NOT NULL,
    event character varying(24) NOT NULL,
    latitude numeric(9,6) NOT NULL,
    longitude numeric(9,6) NOT NULL
);


ALTER TABLE public.django_celery_beat_solarschedule OWNER TO postgres;

--
-- Name: django_celery_beat_solarschedule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.django_celery_beat_solarschedule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_celery_beat_solarschedule_id_seq OWNER TO postgres;

--
-- Name: django_celery_beat_solarschedule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.django_celery_beat_solarschedule_id_seq OWNED BY public.django_celery_beat_solarschedule.id;


--
-- Name: django_content_type; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.django_content_type (
    id integer NOT NULL,
    app_label character varying(100) NOT NULL,
    model character varying(100) NOT NULL
);


ALTER TABLE public.django_content_type OWNER TO postgres;

--
-- Name: django_content_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.django_content_type_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_content_type_id_seq OWNER TO postgres;

--
-- Name: django_content_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.django_content_type_id_seq OWNED BY public.django_content_type.id;


--
-- Name: django_migrations; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.django_migrations (
    id integer NOT NULL,
    app character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    applied timestamp with time zone NOT NULL
);


ALTER TABLE public.django_migrations OWNER TO postgres;

--
-- Name: django_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.django_migrations_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.django_migrations_id_seq OWNER TO postgres;

--
-- Name: django_migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.django_migrations_id_seq OWNED BY public.django_migrations.id;


--
-- Name: django_session; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.django_session (
    session_key character varying(40) NOT NULL,
    session_data text NOT NULL,
    expire_date timestamp with time zone NOT NULL
);


ALTER TABLE public.django_session OWNER TO postgres;

--
-- Name: ep_epsetup; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.ep_epsetup (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    temp_alarm boolean NOT NULL,
    temp_warning numeric(4,1) NOT NULL,
    "temp_warning_F" numeric(4,1),
    temp_unit smallint NOT NULL,
    mask_alarm boolean NOT NULL,
    is_default boolean NOT NULL
);


ALTER TABLE public.ep_epsetup OWNER TO postgres;

--
-- Name: ep_epsetup_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.ep_epsetup_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ep_epsetup_id_seq OWNER TO postgres;

--
-- Name: ep_epsetup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.ep_epsetup_id_seq OWNED BY public.ep_epsetup.id;


--
-- Name: ep_eptransaction; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.ep_eptransaction (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    area character varying(30) NOT NULL,
    check_datetime timestamp with time zone,
    check_date date NOT NULL,
    check_time time without time zone NOT NULL,
    temperature numeric(4,1) NOT NULL,
    is_mask integer NOT NULL,
    upload_time timestamp with time zone NOT NULL,
    source smallint NOT NULL,
    terminal_sn character varying(50),
    emp_id integer,
    terminal_id integer,
    emp_code character varying(50) NOT NULL
);


ALTER TABLE public.ep_eptransaction OWNER TO postgres;

--
-- Name: ep_eptransaction_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.ep_eptransaction_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ep_eptransaction_id_seq OWNER TO postgres;

--
-- Name: ep_eptransaction_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.ep_eptransaction_id_seq OWNED BY public.ep_eptransaction.id;


--
-- Name: guardian_groupobjectpermission; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.guardian_groupobjectpermission (
    id integer NOT NULL,
    object_pk character varying(255) NOT NULL,
    content_type_id integer NOT NULL,
    group_id integer NOT NULL,
    permission_id integer NOT NULL
);


ALTER TABLE public.guardian_groupobjectpermission OWNER TO postgres;

--
-- Name: guardian_groupobjectpermission_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.guardian_groupobjectpermission_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.guardian_groupobjectpermission_id_seq OWNER TO postgres;

--
-- Name: guardian_groupobjectpermission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.guardian_groupobjectpermission_id_seq OWNED BY public.guardian_groupobjectpermission.id;


--
-- Name: guardian_userobjectpermission; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.guardian_userobjectpermission (
    id integer NOT NULL,
    object_pk character varying(255) NOT NULL,
    content_type_id integer NOT NULL,
    permission_id integer NOT NULL,
    user_id integer NOT NULL
);


ALTER TABLE public.guardian_userobjectpermission OWNER TO postgres;

--
-- Name: guardian_userobjectpermission_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.guardian_userobjectpermission_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.guardian_userobjectpermission_id_seq OWNER TO postgres;

--
-- Name: guardian_userobjectpermission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.guardian_userobjectpermission_id_seq OWNED BY public.guardian_userobjectpermission.id;


--
-- Name: iclock_biodata; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_biodata (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    bio_tmp text NOT NULL,
    bio_no integer,
    bio_index integer,
    bio_type integer NOT NULL,
    major_ver character varying(30) NOT NULL,
    minor_ver character varying(30),
    bio_format integer,
    valid integer NOT NULL,
    duress integer NOT NULL,
    update_time timestamp with time zone,
    sn character varying(50),
    employee_id integer NOT NULL
);


ALTER TABLE public.iclock_biodata OWNER TO postgres;

--
-- Name: iclock_biodata_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_biodata_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_biodata_id_seq OWNER TO postgres;

--
-- Name: iclock_biodata_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_biodata_id_seq OWNED BY public.iclock_biodata.id;


--
-- Name: iclock_biophoto; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_biophoto (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    first_name character varying(25),
    last_name character varying(25),
    email character varying(254),
    enroll_sn character varying(50),
    register_photo character varying(100) NOT NULL,
    register_time timestamp with time zone NOT NULL,
    approval_photo character varying(100),
    approval_state smallint NOT NULL,
    approval_time timestamp with time zone,
    remark character varying(100),
    employee_id integer NOT NULL
);


ALTER TABLE public.iclock_biophoto OWNER TO postgres;

--
-- Name: iclock_biophoto_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_biophoto_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_biophoto_id_seq OWNER TO postgres;

--
-- Name: iclock_biophoto_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_biophoto_id_seq OWNED BY public.iclock_biophoto.id;


--
-- Name: iclock_devicemoduleconfig; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_devicemoduleconfig (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    enable_registration boolean NOT NULL,
    enable_resigned_filter boolean NOT NULL,
    enable_auto_add boolean NOT NULL,
    enable_name_upload boolean NOT NULL,
    enable_name_download boolean NOT NULL,
    enable_card_upload boolean NOT NULL,
    encryption boolean NOT NULL,
    timezone smallint NOT NULL,
    global_setup boolean NOT NULL,
    heartbeat integer NOT NULL,
    transfer_mode smallint NOT NULL,
    transfer_interval integer NOT NULL,
    transfer_time character varying(100) NOT NULL,
    transaction_retention integer NOT NULL,
    command_retention integer NOT NULL,
    dev_log_retention integer NOT NULL,
    upload_log_retention integer NOT NULL,
    edit_policy smallint NOT NULL,
    import_policy smallint NOT NULL,
    mobile_policy smallint NOT NULL,
    device_policy smallint NOT NULL,
    api_policy smallint NOT NULL,
    sync_mode smallint NOT NULL,
    sync_time character varying(100) NOT NULL,
    visitor_policy smallint NOT NULL
);


ALTER TABLE public.iclock_devicemoduleconfig OWNER TO postgres;

--
-- Name: iclock_devicemoduleconfig_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_devicemoduleconfig_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_devicemoduleconfig_id_seq OWNER TO postgres;

--
-- Name: iclock_devicemoduleconfig_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_devicemoduleconfig_id_seq OWNED BY public.iclock_devicemoduleconfig.id;


--
-- Name: iclock_errorcommandlog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_errorcommandlog (
    id integer NOT NULL,
    error_code character varying(16),
    error_msg character varying(50),
    data_origin text,
    cmd character varying(50),
    additional text,
    upload_time timestamp with time zone NOT NULL,
    terminal_id integer NOT NULL
);


ALTER TABLE public.iclock_errorcommandlog OWNER TO postgres;

--
-- Name: iclock_errorcommandlog_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_errorcommandlog_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_errorcommandlog_id_seq OWNER TO postgres;

--
-- Name: iclock_errorcommandlog_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_errorcommandlog_id_seq OWNED BY public.iclock_errorcommandlog.id;


--
-- Name: iclock_privatemessage; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_privatemessage (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    last_send timestamp with time zone,
    employee_id integer NOT NULL,
    message_id integer
);


ALTER TABLE public.iclock_privatemessage OWNER TO postgres;

--
-- Name: iclock_privatemessage_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_privatemessage_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_privatemessage_id_seq OWNER TO postgres;

--
-- Name: iclock_privatemessage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_privatemessage_id_seq OWNED BY public.iclock_privatemessage.id;


--
-- Name: iclock_publicmessage; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_publicmessage (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    last_send timestamp with time zone,
    message_id integer,
    terminal_id integer NOT NULL
);


ALTER TABLE public.iclock_publicmessage OWNER TO postgres;

--
-- Name: iclock_publicmessage_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_publicmessage_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_publicmessage_id_seq OWNER TO postgres;

--
-- Name: iclock_publicmessage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_publicmessage_id_seq OWNED BY public.iclock_publicmessage.id;


--
-- Name: iclock_shortmessage; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_shortmessage (
    id integer NOT NULL,
    message text NOT NULL,
    start_time timestamp with time zone NOT NULL,
    duration integer NOT NULL,
    msg_type character varying(5) NOT NULL
);


ALTER TABLE public.iclock_shortmessage OWNER TO postgres;

--
-- Name: iclock_shortmessage_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_shortmessage_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_shortmessage_id_seq OWNER TO postgres;

--
-- Name: iclock_shortmessage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_shortmessage_id_seq OWNED BY public.iclock_shortmessage.id;


--
-- Name: iclock_terminal; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_terminal (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    sn character varying(50) NOT NULL,
    alias character varying(50) NOT NULL,
    ip_address inet NOT NULL,
    real_ip inet,
    state integer NOT NULL,
    terminal_tz smallint NOT NULL,
    heartbeat integer NOT NULL,
    transfer_mode smallint NOT NULL,
    transfer_interval integer NOT NULL,
    transfer_time character varying(100) NOT NULL,
    product_type smallint,
    is_attendance smallint NOT NULL,
    is_registration smallint NOT NULL,
    purpose smallint,
    controller_type smallint,
    authentication smallint NOT NULL,
    style character varying(20),
    upload_flag character varying(10),
    fw_ver character varying(100),
    push_protocol character varying(30) NOT NULL,
    push_ver character varying(30),
    language integer,
    is_tft boolean NOT NULL,
    terminal_name character varying(30),
    platform character varying(30),
    oem_vendor character varying(50),
    log_stamp character varying(30),
    op_log_stamp character varying(30),
    capture_stamp character varying(30),
    user_count integer,
    transaction_count integer,
    fp_count integer,
    fp_alg_ver character varying(10),
    face_count integer,
    face_alg_ver character varying(10),
    fv_count integer,
    fv_alg_ver character varying(10),
    palm_count integer,
    palm_alg_ver character varying(10),
    lock_func smallint NOT NULL,
    last_activity timestamp with time zone,
    upload_time timestamp with time zone,
    push_time timestamp with time zone,
    is_access smallint NOT NULL,
    area_id integer
);


ALTER TABLE public.iclock_terminal OWNER TO postgres;

--
-- Name: iclock_terminal_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_terminal_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_terminal_id_seq OWNER TO postgres;

--
-- Name: iclock_terminal_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_terminal_id_seq OWNED BY public.iclock_terminal.id;


--
-- Name: iclock_terminalcommand; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_terminalcommand (
    id integer NOT NULL,
    content text NOT NULL,
    commit_time timestamp with time zone NOT NULL,
    transfer_time timestamp with time zone,
    return_time timestamp with time zone,
    return_value integer,
    package integer,
    terminal_id integer NOT NULL
);


ALTER TABLE public.iclock_terminalcommand OWNER TO postgres;

--
-- Name: iclock_terminalcommand_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_terminalcommand_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_terminalcommand_id_seq OWNER TO postgres;

--
-- Name: iclock_terminalcommand_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_terminalcommand_id_seq OWNED BY public.iclock_terminalcommand.id;


--
-- Name: iclock_terminalcommandlog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_terminalcommandlog (
    id integer NOT NULL,
    content text NOT NULL,
    commit_time timestamp with time zone NOT NULL,
    transfer_time timestamp with time zone,
    return_time timestamp with time zone,
    return_value integer,
    package integer,
    terminal_id integer NOT NULL
);


ALTER TABLE public.iclock_terminalcommandlog OWNER TO postgres;

--
-- Name: iclock_terminalcommandlog_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_terminalcommandlog_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_terminalcommandlog_id_seq OWNER TO postgres;

--
-- Name: iclock_terminalcommandlog_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_terminalcommandlog_id_seq OWNED BY public.iclock_terminalcommandlog.id;


--
-- Name: iclock_terminalemployee; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_terminalemployee (
    id integer NOT NULL,
    terminal_sn character varying(50) NOT NULL,
    emp_code character varying(20) NOT NULL,
    privilege smallint NOT NULL
);


ALTER TABLE public.iclock_terminalemployee OWNER TO postgres;

--
-- Name: iclock_terminalemployee_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_terminalemployee_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_terminalemployee_id_seq OWNER TO postgres;

--
-- Name: iclock_terminalemployee_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_terminalemployee_id_seq OWNED BY public.iclock_terminalemployee.id;


--
-- Name: iclock_terminallog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_terminallog (
    id integer NOT NULL,
    terminal_tz smallint,
    admin character varying(50),
    action_name smallint,
    action_time timestamp with time zone,
    object character varying(50),
    param1 integer,
    param2 integer,
    param3 integer,
    upload_time timestamp with time zone,
    terminal_id integer NOT NULL
);


ALTER TABLE public.iclock_terminallog OWNER TO postgres;

--
-- Name: iclock_terminallog_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_terminallog_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_terminallog_id_seq OWNER TO postgres;

--
-- Name: iclock_terminallog_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_terminallog_id_seq OWNED BY public.iclock_terminallog.id;


--
-- Name: iclock_terminalparameter; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_terminalparameter (
    id integer NOT NULL,
    param_type character varying(10),
    param_name character varying(30) NOT NULL,
    param_value character varying(100) NOT NULL,
    terminal_id integer NOT NULL
);


ALTER TABLE public.iclock_terminalparameter OWNER TO postgres;

--
-- Name: iclock_terminalparameter_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_terminalparameter_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_terminalparameter_id_seq OWNER TO postgres;

--
-- Name: iclock_terminalparameter_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_terminalparameter_id_seq OWNED BY public.iclock_terminalparameter.id;


--
-- Name: iclock_terminaluploadlog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_terminaluploadlog (
    id integer NOT NULL,
    event character varying(80) NOT NULL,
    content character varying(80) NOT NULL,
    upload_count integer NOT NULL,
    error_count integer NOT NULL,
    upload_time timestamp with time zone NOT NULL,
    terminal_id integer NOT NULL
);


ALTER TABLE public.iclock_terminaluploadlog OWNER TO postgres;

--
-- Name: iclock_terminaluploadlog_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_terminaluploadlog_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_terminaluploadlog_id_seq OWNER TO postgres;

--
-- Name: iclock_terminaluploadlog_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_terminaluploadlog_id_seq OWNED BY public.iclock_terminaluploadlog.id;


--
-- Name: iclock_terminalworkcode; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_terminalworkcode (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    code character varying(8) NOT NULL,
    alias character varying(24) NOT NULL,
    last_activity timestamp with time zone,
    company_id integer
);


ALTER TABLE public.iclock_terminalworkcode OWNER TO postgres;

--
-- Name: iclock_terminalworkcode_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_terminalworkcode_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_terminalworkcode_id_seq OWNER TO postgres;

--
-- Name: iclock_terminalworkcode_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_terminalworkcode_id_seq OWNED BY public.iclock_terminalworkcode.id;


--
-- Name: iclock_transaction; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_transaction (
    id integer NOT NULL,
    emp_code character varying(20) NOT NULL,
    punch_time timestamp with time zone NOT NULL,
    punch_state character varying(5) NOT NULL,
    verify_type integer NOT NULL,
    work_code character varying(20),
    terminal_sn character varying(50),
    terminal_alias character varying(50),
    area_alias character varying(30),
    longitude double precision,
    latitude double precision,
    gps_location text,
    mobile character varying(50),
    source smallint,
    purpose smallint,
    crc character varying(100),
    is_attendance smallint,
    reserved character varying(100),
    upload_time timestamp with time zone,
    sync_status smallint,
    sync_time timestamp with time zone,
    is_mask smallint,
    temperature numeric(4,1),
    emp_id integer,
    terminal_id integer,
    company_code character varying(50)
);


ALTER TABLE public.iclock_transaction OWNER TO postgres;

--
-- Name: iclock_transaction_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_transaction_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_transaction_id_seq OWNER TO postgres;

--
-- Name: iclock_transaction_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_transaction_id_seq OWNED BY public.iclock_transaction.id;


--
-- Name: iclock_transactionproofcmd; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.iclock_transactionproofcmd (
    id integer NOT NULL,
    action_time timestamp with time zone NOT NULL,
    start_time timestamp with time zone NOT NULL,
    end_time timestamp with time zone NOT NULL,
    terminal_count integer,
    server_count integer,
    flag smallint,
    reserved_init integer,
    reserved_float double precision,
    reserved_char character varying(30),
    terminal_id integer NOT NULL
);


ALTER TABLE public.iclock_transactionproofcmd OWNER TO postgres;

--
-- Name: iclock_transactionproofcmd_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.iclock_transactionproofcmd_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.iclock_transactionproofcmd_id_seq OWNER TO postgres;

--
-- Name: iclock_transactionproofcmd_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.iclock_transactionproofcmd_id_seq OWNED BY public.iclock_transactionproofcmd.id;


--
-- Name: meeting_meetingentity; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.meeting_meetingentity (
    workflowinstance_ptr_id integer NOT NULL,
    code character varying(32) NOT NULL,
    alias character varying(50) NOT NULL,
    content character varying(200),
    meeting_date date NOT NULL,
    start_time timestamp with time zone NOT NULL,
    end_time timestamp with time zone NOT NULL,
    duration integer NOT NULL,
    in_required boolean NOT NULL,
    in_start timestamp with time zone NOT NULL,
    in_end timestamp with time zone NOT NULL,
    out_required boolean NOT NULL,
    out_start timestamp with time zone NOT NULL,
    out_end timestamp with time zone NOT NULL,
    apply_reason character varying(200) NOT NULL,
    apply_time timestamp with time zone NOT NULL,
    calculation_time timestamp with time zone,
    sync_time timestamp with time zone,
    room_id integer,
    auto_recording character varying(50) NOT NULL,
    enable_virtual boolean NOT NULL,
    enable_waiting_room boolean NOT NULL,
    host_video boolean NOT NULL,
    jbh_anytime boolean NOT NULL,
    link_data text,
    mute_upon_entry boolean NOT NULL,
    participant_video boolean NOT NULL,
    preferences text,
    time_zone smallint NOT NULL,
    view_date date NOT NULL,
    virutal_uuid character varying(50)
);


ALTER TABLE public.meeting_meetingentity OWNER TO postgres;

--
-- Name: meeting_meetingentity_attender; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.meeting_meetingentity_attender (
    id integer NOT NULL,
    meetingentity_id integer NOT NULL,
    employee_id integer NOT NULL
);


ALTER TABLE public.meeting_meetingentity_attender OWNER TO postgres;

--
-- Name: meeting_meetingentity_attender_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.meeting_meetingentity_attender_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.meeting_meetingentity_attender_id_seq OWNER TO postgres;

--
-- Name: meeting_meetingentity_attender_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.meeting_meetingentity_attender_id_seq OWNED BY public.meeting_meetingentity_attender.id;


--
-- Name: meeting_meetingmanuallog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.meeting_meetingmanuallog (
    workflowinstance_ptr_id integer NOT NULL,
    punch_time timestamp with time zone NOT NULL,
    punch_state character varying(5) NOT NULL,
    apply_reason character varying(200) NOT NULL,
    apply_time timestamp with time zone NOT NULL,
    meeting_id integer
);


ALTER TABLE public.meeting_meetingmanuallog OWNER TO postgres;

--
-- Name: meeting_meetingpayloadbase; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.meeting_meetingpayloadbase (
    id uuid NOT NULL,
    start_time timestamp with time zone NOT NULL,
    end_time timestamp with time zone NOT NULL,
    duration integer NOT NULL,
    meeting_date date NOT NULL,
    clock_in timestamp with time zone,
    clock_out timestamp with time zone,
    attended_duration integer NOT NULL,
    late_in integer NOT NULL,
    early_out integer NOT NULL,
    absent integer NOT NULL,
    emp_id integer NOT NULL,
    meeting_id integer NOT NULL
);


ALTER TABLE public.meeting_meetingpayloadbase OWNER TO postgres;

--
-- Name: meeting_meetingroom; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.meeting_meetingroom (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    code character varying(32) NOT NULL,
    alias character varying(50) NOT NULL,
    capacity integer NOT NULL,
    location character varying(200) NOT NULL,
    remark text,
    state smallint NOT NULL,
    enable_room boolean NOT NULL
);


ALTER TABLE public.meeting_meetingroom OWNER TO postgres;

--
-- Name: meeting_meetingroom_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.meeting_meetingroom_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.meeting_meetingroom_id_seq OWNER TO postgres;

--
-- Name: meeting_meetingroom_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.meeting_meetingroom_id_seq OWNED BY public.meeting_meetingroom.id;


--
-- Name: meeting_meetingroomdevice; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.meeting_meetingroomdevice (
    id integer NOT NULL,
    device_id integer NOT NULL,
    room_id integer
);


ALTER TABLE public.meeting_meetingroomdevice OWNER TO postgres;

--
-- Name: meeting_meetingroomdevice_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.meeting_meetingroomdevice_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.meeting_meetingroomdevice_id_seq OWNER TO postgres;

--
-- Name: meeting_meetingroomdevice_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.meeting_meetingroomdevice_id_seq OWNED BY public.meeting_meetingroomdevice.id;


--
-- Name: meeting_meetingtransaction; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.meeting_meetingtransaction (
    id integer NOT NULL,
    emp_code character varying(50) NOT NULL,
    punch_datetime timestamp with time zone NOT NULL,
    punch_date date NOT NULL,
    punch_time time without time zone NOT NULL,
    punch_state character varying(5) NOT NULL,
    source smallint NOT NULL,
    upload_time timestamp with time zone NOT NULL,
    emp_id integer,
    meeting_id integer,
    terminal_id integer
);


ALTER TABLE public.meeting_meetingtransaction OWNER TO postgres;

--
-- Name: meeting_meetingtransaction_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.meeting_meetingtransaction_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.meeting_meetingtransaction_id_seq OWNER TO postgres;

--
-- Name: meeting_meetingtransaction_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.meeting_meetingtransaction_id_seq OWNED BY public.meeting_meetingtransaction.id;


--
-- Name: mobile_announcement; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.mobile_announcement (
    id integer NOT NULL,
    subject character varying(100) NOT NULL,
    content text NOT NULL,
    category smallint NOT NULL,
    sender character varying(50),
    system_sender character varying(50),
    create_time timestamp with time zone,
    admin_id integer,
    init_sender_id integer,
    receiver_id integer
);


ALTER TABLE public.mobile_announcement OWNER TO postgres;

--
-- Name: mobile_announcement_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.mobile_announcement_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mobile_announcement_id_seq OWNER TO postgres;

--
-- Name: mobile_announcement_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.mobile_announcement_id_seq OWNED BY public.mobile_announcement.id;


--
-- Name: mobile_appactionlog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.mobile_appactionlog (
    id integer NOT NULL,
    "user" character varying(20) NOT NULL,
    client character varying(50),
    action character varying(50),
    params text,
    describe text,
    request_status smallint NOT NULL,
    action_time timestamp with time zone NOT NULL,
    remote_ip character varying(20)
);


ALTER TABLE public.mobile_appactionlog OWNER TO postgres;

--
-- Name: mobile_appactionlog_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.mobile_appactionlog_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mobile_appactionlog_id_seq OWNER TO postgres;

--
-- Name: mobile_appactionlog_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.mobile_appactionlog_id_seq OWNED BY public.mobile_appactionlog.id;


--
-- Name: mobile_applist; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.mobile_applist (
    id integer NOT NULL,
    username character varying(50) NOT NULL,
    login_time timestamp with time zone NOT NULL,
    last_active timestamp with time zone NOT NULL,
    token text NOT NULL,
    device_token text NOT NULL,
    client_id character varying(100) NOT NULL,
    client_category smallint NOT NULL,
    active smallint,
    enable smallint
);


ALTER TABLE public.mobile_applist OWNER TO postgres;

--
-- Name: mobile_applist_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.mobile_applist_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mobile_applist_id_seq OWNER TO postgres;

--
-- Name: mobile_applist_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.mobile_applist_id_seq OWNED BY public.mobile_applist.id;


--
-- Name: mobile_appnotification; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.mobile_appnotification (
    id integer NOT NULL,
    sender character varying(50),
    system_sender character varying(50),
    category smallint NOT NULL,
    sub_category integer,
    content text,
    payload text,
    source integer,
    notification_time timestamp with time zone NOT NULL,
    read_status smallint NOT NULL,
    read_time timestamp with time zone,
    admin_id integer,
    init_sender_id integer,
    receiver_id integer NOT NULL
);


ALTER TABLE public.mobile_appnotification OWNER TO postgres;

--
-- Name: mobile_appnotification_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.mobile_appnotification_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mobile_appnotification_id_seq OWNER TO postgres;

--
-- Name: mobile_appnotification_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.mobile_appnotification_id_seq OWNED BY public.mobile_appnotification.id;


--
-- Name: mobile_gpsfordepartment; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.mobile_gpsfordepartment (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    distance integer NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    department_id integer NOT NULL
);


ALTER TABLE public.mobile_gpsfordepartment OWNER TO postgres;

--
-- Name: mobile_gpsfordepartment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.mobile_gpsfordepartment_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mobile_gpsfordepartment_id_seq OWNER TO postgres;

--
-- Name: mobile_gpsfordepartment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.mobile_gpsfordepartment_id_seq OWNED BY public.mobile_gpsfordepartment.id;


--
-- Name: mobile_gpsfordepartment_location; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.mobile_gpsfordepartment_location (
    id integer NOT NULL,
    gpsfordepartment_id integer NOT NULL,
    gpslocation_id integer NOT NULL
);


ALTER TABLE public.mobile_gpsfordepartment_location OWNER TO postgres;

--
-- Name: mobile_gpsfordepartment_location_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.mobile_gpsfordepartment_location_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mobile_gpsfordepartment_location_id_seq OWNER TO postgres;

--
-- Name: mobile_gpsfordepartment_location_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.mobile_gpsfordepartment_location_id_seq OWNED BY public.mobile_gpsfordepartment_location.id;


--
-- Name: mobile_gpsforemployee; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.mobile_gpsforemployee (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    distance integer NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    employee_id integer NOT NULL
);


ALTER TABLE public.mobile_gpsforemployee OWNER TO postgres;

--
-- Name: mobile_gpsforemployee_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.mobile_gpsforemployee_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mobile_gpsforemployee_id_seq OWNER TO postgres;

--
-- Name: mobile_gpsforemployee_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.mobile_gpsforemployee_id_seq OWNED BY public.mobile_gpsforemployee.id;


--
-- Name: mobile_gpsforemployee_location; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.mobile_gpsforemployee_location (
    id integer NOT NULL,
    gpsforemployee_id integer NOT NULL,
    gpslocation_id integer NOT NULL
);


ALTER TABLE public.mobile_gpsforemployee_location OWNER TO postgres;

--
-- Name: mobile_gpsforemployee_location_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.mobile_gpsforemployee_location_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mobile_gpsforemployee_location_id_seq OWNER TO postgres;

--
-- Name: mobile_gpsforemployee_location_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.mobile_gpsforemployee_location_id_seq OWNED BY public.mobile_gpsforemployee_location.id;


--
-- Name: mobile_gpslocation; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.mobile_gpslocation (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    alias character varying(100) NOT NULL,
    location character varying(100) NOT NULL,
    longitude double precision NOT NULL,
    latitude double precision NOT NULL
);


ALTER TABLE public.mobile_gpslocation OWNER TO postgres;

--
-- Name: mobile_gpslocation_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.mobile_gpslocation_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mobile_gpslocation_id_seq OWNER TO postgres;

--
-- Name: mobile_gpslocation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.mobile_gpslocation_id_seq OWNED BY public.mobile_gpslocation.id;


--
-- Name: mobile_mobileapirequestlog; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.mobile_mobileapirequestlog (
    id integer NOT NULL,
    username_persistent character varying(200),
    requested_at timestamp with time zone NOT NULL,
    response_ms integer NOT NULL,
    path character varying(200) NOT NULL,
    view character varying(200),
    view_method character varying(200),
    remote_addr inet NOT NULL,
    host character varying(200) NOT NULL,
    method character varying(10) NOT NULL,
    query_params text,
    data text,
    response text,
    errors text,
    status_code integer,
    user_id integer,
    CONSTRAINT mobile_mobileapirequestlog_response_ms_check CHECK ((response_ms >= 0)),
    CONSTRAINT mobile_mobileapirequestlog_status_code_check CHECK ((status_code >= 0))
);


ALTER TABLE public.mobile_mobileapirequestlog OWNER TO postgres;

--
-- Name: mobile_mobileapirequestlog_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.mobile_mobileapirequestlog_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.mobile_mobileapirequestlog_id_seq OWNER TO postgres;

--
-- Name: mobile_mobileapirequestlog_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.mobile_mobileapirequestlog_id_seq OWNED BY public.mobile_mobileapirequestlog.id;


--
-- Name: payroll_deductionformula; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_deductionformula (
    id integer NOT NULL,
    name character varying(30) NOT NULL,
    formula character varying(100) NOT NULL,
    remark text
);


ALTER TABLE public.payroll_deductionformula OWNER TO postgres;

--
-- Name: payroll_deductionformula_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_deductionformula_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_deductionformula_id_seq OWNER TO postgres;

--
-- Name: payroll_deductionformula_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_deductionformula_id_seq OWNED BY public.payroll_deductionformula.id;


--
-- Name: payroll_emploan; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_emploan (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    loan_amount double precision NOT NULL,
    loan_time timestamp with time zone NOT NULL,
    refund_cycle smallint NOT NULL,
    per_cycle_refund double precision NOT NULL,
    loan_clean_time timestamp with time zone,
    remark character varying(300),
    employee_id integer
);


ALTER TABLE public.payroll_emploan OWNER TO postgres;

--
-- Name: payroll_emploan_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_emploan_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_emploan_id_seq OWNER TO postgres;

--
-- Name: payroll_emploan_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_emploan_id_seq OWNED BY public.payroll_emploan.id;


--
-- Name: payroll_emppayrollprofile; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_emppayrollprofile (
    id integer NOT NULL,
    payment_mode smallint,
    payment_type smallint,
    bank_name character varying(30),
    bank_account character varying(30),
    personnel_id character varying(30),
    agent_id character varying(30),
    agent_account character varying(30),
    employee_id integer NOT NULL
);


ALTER TABLE public.payroll_emppayrollprofile OWNER TO postgres;

--
-- Name: payroll_emppayrollprofile_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_emppayrollprofile_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_emppayrollprofile_id_seq OWNER TO postgres;

--
-- Name: payroll_emppayrollprofile_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_emppayrollprofile_id_seq OWNED BY public.payroll_emppayrollprofile.id;


--
-- Name: payroll_exceptionformula; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_exceptionformula (
    id integer NOT NULL,
    name character varying(30) NOT NULL,
    formula character varying(100) NOT NULL,
    remark text,
    pay_code_id integer NOT NULL
);


ALTER TABLE public.payroll_exceptionformula OWNER TO postgres;

--
-- Name: payroll_exceptionformula_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_exceptionformula_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_exceptionformula_id_seq OWNER TO postgres;

--
-- Name: payroll_exceptionformula_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_exceptionformula_id_seq OWNED BY public.payroll_exceptionformula.id;


--
-- Name: payroll_extradeduction; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_extradeduction (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    amount double precision NOT NULL,
    issued_time timestamp with time zone NOT NULL,
    remark character varying(300),
    employee_id integer
);


ALTER TABLE public.payroll_extradeduction OWNER TO postgres;

--
-- Name: payroll_extradeduction_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_extradeduction_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_extradeduction_id_seq OWNER TO postgres;

--
-- Name: payroll_extradeduction_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_extradeduction_id_seq OWNED BY public.payroll_extradeduction.id;


--
-- Name: payroll_extraincrease; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_extraincrease (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    amount double precision NOT NULL,
    issued_time timestamp with time zone NOT NULL,
    remark character varying(300),
    employee_id integer
);


ALTER TABLE public.payroll_extraincrease OWNER TO postgres;

--
-- Name: payroll_extraincrease_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_extraincrease_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_extraincrease_id_seq OWNER TO postgres;

--
-- Name: payroll_extraincrease_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_extraincrease_id_seq OWNED BY public.payroll_extraincrease.id;


--
-- Name: payroll_increasementformula; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_increasementformula (
    id integer NOT NULL,
    name character varying(30) NOT NULL,
    formula character varying(100) NOT NULL,
    remark text
);


ALTER TABLE public.payroll_increasementformula OWNER TO postgres;

--
-- Name: payroll_increasementformula_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_increasementformula_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_increasementformula_id_seq OWNER TO postgres;

--
-- Name: payroll_increasementformula_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_increasementformula_id_seq OWNED BY public.payroll_increasementformula.id;


--
-- Name: payroll_leaveformula; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_leaveformula (
    id integer NOT NULL,
    name character varying(30) NOT NULL,
    formula character varying(100) NOT NULL,
    remark text,
    pay_code_id integer NOT NULL
);


ALTER TABLE public.payroll_leaveformula OWNER TO postgres;

--
-- Name: payroll_leaveformula_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_leaveformula_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_leaveformula_id_seq OWNER TO postgres;

--
-- Name: payroll_leaveformula_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_leaveformula_id_seq OWNED BY public.payroll_leaveformula.id;


--
-- Name: payroll_overtimeformula; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_overtimeformula (
    id integer NOT NULL,
    name character varying(30) NOT NULL,
    formula character varying(100) NOT NULL,
    remark text,
    pay_code_id integer NOT NULL
);


ALTER TABLE public.payroll_overtimeformula OWNER TO postgres;

--
-- Name: payroll_overtimeformula_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_overtimeformula_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_overtimeformula_id_seq OWNER TO postgres;

--
-- Name: payroll_overtimeformula_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_overtimeformula_id_seq OWNED BY public.payroll_overtimeformula.id;


--
-- Name: payroll_payrollpayload; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_payrollpayload (
    id integer NOT NULL,
    calc_time date,
    basic_salary double precision,
    effective_date date,
    format_dict text,
    payment_mode smallint,
    increase double precision,
    deduction double precision,
    increase_formula text,
    deduction_formula text,
    increase_formula_name text,
    deduction_formula_name text,
    extra_increase double precision,
    extra_deduction double precision,
    total_loan_amount double precision,
    refund_loan_amount double precision,
    unrefund_loan_amount double precision,
    loan_deduction double precision,
    loan_increase double precision,
    advance_increase double precision,
    advance_deduction double precision,
    reimbursement double precision,
    total_increase_formula text,
    total_increase_formula_name text,
    total_increase_expression text,
    total_increase double precision,
    total_deduction_formula text,
    total_deduction_formula_name text,
    total_deduction_expression text,
    total_deduction double precision,
    total_salary_expression text,
    total_salary double precision,
    employee_id integer NOT NULL
);


ALTER TABLE public.payroll_payrollpayload OWNER TO postgres;

--
-- Name: payroll_payrollpayload_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_payrollpayload_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_payrollpayload_id_seq OWNER TO postgres;

--
-- Name: payroll_payrollpayload_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_payrollpayload_id_seq OWNED BY public.payroll_payrollpayload.id;


--
-- Name: payroll_payrollpayloadpaycode; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_payrollpayloadpaycode (
    id integer NOT NULL,
    amount double precision,
    formula text,
    formula_name text,
    pay_code_id integer NOT NULL,
    payload_id integer NOT NULL
);


ALTER TABLE public.payroll_payrollpayloadpaycode OWNER TO postgres;

--
-- Name: payroll_payrollpayloadpaycode_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_payrollpayloadpaycode_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_payrollpayloadpaycode_id_seq OWNER TO postgres;

--
-- Name: payroll_payrollpayloadpaycode_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_payrollpayloadpaycode_id_seq OWNED BY public.payroll_payrollpayloadpaycode.id;


--
-- Name: payroll_reimbursement; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_reimbursement (
    id integer NOT NULL,
    rmb_amount double precision NOT NULL,
    rmb_time timestamp with time zone NOT NULL,
    rmb_file character varying(200),
    rmb_remark character varying(300),
    employee_id integer
);


ALTER TABLE public.payroll_reimbursement OWNER TO postgres;

--
-- Name: payroll_reimbursement_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_reimbursement_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_reimbursement_id_seq OWNER TO postgres;

--
-- Name: payroll_reimbursement_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_reimbursement_id_seq OWNED BY public.payroll_reimbursement.id;


--
-- Name: payroll_salaryadvance; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_salaryadvance (
    id integer NOT NULL,
    advance_amount double precision NOT NULL,
    advance_time timestamp with time zone NOT NULL,
    advance_remark character varying(300),
    employee_id integer
);


ALTER TABLE public.payroll_salaryadvance OWNER TO postgres;

--
-- Name: payroll_salaryadvance_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_salaryadvance_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_salaryadvance_id_seq OWNER TO postgres;

--
-- Name: payroll_salaryadvance_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_salaryadvance_id_seq OWNED BY public.payroll_salaryadvance.id;


--
-- Name: payroll_salarystructure; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_salarystructure (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    salary_amount double precision NOT NULL,
    effective_date date NOT NULL,
    salary_remark character varying(300),
    employee_id integer
);


ALTER TABLE public.payroll_salarystructure OWNER TO postgres;

--
-- Name: payroll_salarystructure_deductionformula; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_salarystructure_deductionformula (
    id integer NOT NULL,
    salarystructure_id integer NOT NULL,
    deductionformula_id integer NOT NULL
);


ALTER TABLE public.payroll_salarystructure_deductionformula OWNER TO postgres;

--
-- Name: payroll_salarystructure_deductionformula_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_salarystructure_deductionformula_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_salarystructure_deductionformula_id_seq OWNER TO postgres;

--
-- Name: payroll_salarystructure_deductionformula_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_salarystructure_deductionformula_id_seq OWNED BY public.payroll_salarystructure_deductionformula.id;


--
-- Name: payroll_salarystructure_exceptionformula; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_salarystructure_exceptionformula (
    id integer NOT NULL,
    salarystructure_id integer NOT NULL,
    exceptionformula_id integer NOT NULL
);


ALTER TABLE public.payroll_salarystructure_exceptionformula OWNER TO postgres;

--
-- Name: payroll_salarystructure_exceptionformula_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_salarystructure_exceptionformula_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_salarystructure_exceptionformula_id_seq OWNER TO postgres;

--
-- Name: payroll_salarystructure_exceptionformula_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_salarystructure_exceptionformula_id_seq OWNED BY public.payroll_salarystructure_exceptionformula.id;


--
-- Name: payroll_salarystructure_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_salarystructure_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_salarystructure_id_seq OWNER TO postgres;

--
-- Name: payroll_salarystructure_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_salarystructure_id_seq OWNED BY public.payroll_salarystructure.id;


--
-- Name: payroll_salarystructure_increasementformula; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_salarystructure_increasementformula (
    id integer NOT NULL,
    salarystructure_id integer NOT NULL,
    increasementformula_id integer NOT NULL
);


ALTER TABLE public.payroll_salarystructure_increasementformula OWNER TO postgres;

--
-- Name: payroll_salarystructure_increasementformula_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_salarystructure_increasementformula_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_salarystructure_increasementformula_id_seq OWNER TO postgres;

--
-- Name: payroll_salarystructure_increasementformula_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_salarystructure_increasementformula_id_seq OWNED BY public.payroll_salarystructure_increasementformula.id;


--
-- Name: payroll_salarystructure_leaveformula; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_salarystructure_leaveformula (
    id integer NOT NULL,
    salarystructure_id integer NOT NULL,
    leaveformula_id integer NOT NULL
);


ALTER TABLE public.payroll_salarystructure_leaveformula OWNER TO postgres;

--
-- Name: payroll_salarystructure_leaveformula_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_salarystructure_leaveformula_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_salarystructure_leaveformula_id_seq OWNER TO postgres;

--
-- Name: payroll_salarystructure_leaveformula_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_salarystructure_leaveformula_id_seq OWNED BY public.payroll_salarystructure_leaveformula.id;


--
-- Name: payroll_salarystructure_overtimeformula; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.payroll_salarystructure_overtimeformula (
    id integer NOT NULL,
    salarystructure_id integer NOT NULL,
    overtimeformula_id integer NOT NULL
);


ALTER TABLE public.payroll_salarystructure_overtimeformula OWNER TO postgres;

--
-- Name: payroll_salarystructure_overtimeformula_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.payroll_salarystructure_overtimeformula_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.payroll_salarystructure_overtimeformula_id_seq OWNER TO postgres;

--
-- Name: payroll_salarystructure_overtimeformula_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.payroll_salarystructure_overtimeformula_id_seq OWNED BY public.payroll_salarystructure_overtimeformula.id;


--
-- Name: personnel_area; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.personnel_area (
    id integer NOT NULL,
    area_code character varying(30) NOT NULL,
    area_name character varying(30) NOT NULL,
    is_default boolean NOT NULL,
    parent_area_id integer,
    company_id integer NOT NULL,
    device_count integer NOT NULL,
    employee_count integer NOT NULL
);


ALTER TABLE public.personnel_area OWNER TO postgres;

--
-- Name: personnel_area_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.personnel_area_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personnel_area_id_seq OWNER TO postgres;

--
-- Name: personnel_area_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.personnel_area_id_seq OWNED BY public.personnel_area.id;


--
-- Name: personnel_assignareaemployee; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.personnel_assignareaemployee (
    id integer NOT NULL,
    assigned_time timestamp with time zone NOT NULL,
    area_id integer NOT NULL,
    employee_id integer NOT NULL
);


ALTER TABLE public.personnel_assignareaemployee OWNER TO postgres;

--
-- Name: personnel_assignareaemployee_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.personnel_assignareaemployee_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personnel_assignareaemployee_id_seq OWNER TO postgres;

--
-- Name: personnel_assignareaemployee_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.personnel_assignareaemployee_id_seq OWNED BY public.personnel_assignareaemployee.id;


--
-- Name: personnel_certification; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.personnel_certification (
    id integer NOT NULL,
    cert_code character varying(20) NOT NULL,
    cert_name character varying(50) NOT NULL
);


ALTER TABLE public.personnel_certification OWNER TO postgres;

--
-- Name: personnel_certification_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.personnel_certification_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personnel_certification_id_seq OWNER TO postgres;

--
-- Name: personnel_certification_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.personnel_certification_id_seq OWNED BY public.personnel_certification.id;


--
-- Name: personnel_company; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.personnel_company (
    id integer NOT NULL,
    company_code character varying(50) NOT NULL,
    company_name character varying(100) NOT NULL,
    is_default boolean NOT NULL
);


ALTER TABLE public.personnel_company OWNER TO postgres;

--
-- Name: personnel_company_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.personnel_company_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personnel_company_id_seq OWNER TO postgres;

--
-- Name: personnel_company_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.personnel_company_id_seq OWNED BY public.personnel_company.id;


--
-- Name: personnel_department; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.personnel_department (
    id integer NOT NULL,
    dept_code character varying(50) NOT NULL,
    dept_name character varying(100) NOT NULL,
    is_default boolean NOT NULL,
    parent_dept_id integer,
    dept_manager_id integer,
    company_id integer NOT NULL
);


ALTER TABLE public.personnel_department OWNER TO postgres;

--
-- Name: personnel_department_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.personnel_department_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personnel_department_id_seq OWNER TO postgres;

--
-- Name: personnel_department_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.personnel_department_id_seq OWNED BY public.personnel_department.id;


--
-- Name: personnel_employee; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.personnel_employee (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    emp_code character varying(20) NOT NULL,
    first_name character varying(25),
    last_name character varying(25),
    nickname character varying(25),
    passport character varying(30),
    driver_license_automobile character varying(30),
    driver_license_motorcycle character varying(30),
    photo character varying(200),
    self_password character varying(128),
    device_password character varying(20),
    dev_privilege integer,
    card_no character varying(20),
    acc_group character varying(5),
    acc_timezone character varying(20),
    gender character varying(1),
    birthday date,
    address character varying(200),
    postcode character varying(10),
    office_tel character varying(20),
    contact_tel character varying(20),
    mobile character varying(20),
    "national" character varying(50),
    religion character varying(20),
    title character varying(20),
    enroll_sn character varying(20),
    ssn character varying(20),
    update_time timestamp with time zone,
    hire_date date,
    verify_mode integer,
    city character varying(20),
    emp_type smallint,
    enable_payroll boolean NOT NULL,
    app_status smallint,
    app_role smallint,
    email character varying(50),
    last_login timestamp with time zone,
    is_active boolean NOT NULL,
    session_key character varying(32),
    login_ip character varying(32),
    department_id integer,
    position_id integer,
    leave_group integer,
    emp_code_digit bigint,
    superior_id integer,
    company_id integer NOT NULL
);


ALTER TABLE public.personnel_employee OWNER TO postgres;

--
-- Name: personnel_employee_area; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.personnel_employee_area (
    id integer NOT NULL,
    employee_id integer NOT NULL,
    area_id integer NOT NULL
);


ALTER TABLE public.personnel_employee_area OWNER TO postgres;

--
-- Name: personnel_employee_area_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.personnel_employee_area_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personnel_employee_area_id_seq OWNER TO postgres;

--
-- Name: personnel_employee_area_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.personnel_employee_area_id_seq OWNED BY public.personnel_employee_area.id;


--
-- Name: personnel_employee_flow_role; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.personnel_employee_flow_role (
    id integer NOT NULL,
    employee_id integer NOT NULL,
    workflowrole_id integer NOT NULL
);


ALTER TABLE public.personnel_employee_flow_role OWNER TO postgres;

--
-- Name: personnel_employee_flow_role_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.personnel_employee_flow_role_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personnel_employee_flow_role_id_seq OWNER TO postgres;

--
-- Name: personnel_employee_flow_role_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.personnel_employee_flow_role_id_seq OWNED BY public.personnel_employee_flow_role.id;


--
-- Name: personnel_employee_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.personnel_employee_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personnel_employee_id_seq OWNER TO postgres;

--
-- Name: personnel_employee_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.personnel_employee_id_seq OWNED BY public.personnel_employee.id;


--
-- Name: personnel_employeecalendar; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.personnel_employeecalendar (
    id integer NOT NULL,
    create_time timestamp with time zone,
    create_user character varying(150),
    change_time timestamp with time zone,
    change_user character varying(150),
    status smallint NOT NULL,
    calendar character varying(100),
    employee_id integer NOT NULL
);


ALTER TABLE public.personnel_employeecalendar OWNER TO postgres;

--
-- Name: personnel_employeecalendar_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.personnel_employeecalendar_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.personnel_employeecalendar_id_seq OWNER TO postgres;

--
-- Name: personnel_employeecalendar_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.personnel_employeecalendar_id_seq OWNED BY public.personnel_employeecalendar.id;


--
-- Name: personnel_employeecertification; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.personnel_employeecertification (
    id integer NOT NULL,
    expire_on date,
    email_alert boolean NOT NULL,
    before integer,
    certification_id integer NOT NULL,
    employee_id integer NOT NULL,
    certification_code character varying(20),
    file character varying(200),
    file_name character varying(200)
);


ALTER TABLE public.personnel_employeecertification OWNER TO postgres;

--
