alter table base.buildings add constraint fk_3mh9ywb7pw1runo1h79893bbi foreign key (campus_id) references base.campuses (id);
alter table base.buildings add constraint fk_bufwfmj5qrhyqg47g4rf5xlw4 foreign key (building_type_id) references code.building_types (id);
alter table base.buildings add constraint fk_mehen8uiocff8432w8cosbbp3 foreign key (school_id) references base.schools (id);
alter table base.calendar_stages add constraint fk_o5ac0xh0gtvplxkpqf514kik9 foreign key (school_id) references base.schools (id);
alter table base.calendars add constraint fk_25rh396ddxflawfrfvv8qh0yc foreign key (school_id) references base.schools (id);
alter table base.campuses add constraint fk_ibhhhrrl31o4bsji3p9w6ux5o foreign key (school_id) references base.schools (id);
alter table base.classrooms add constraint fk_h2x4opmrr2d74qyd1i04cklgr foreign key (room_type_id) references code.classroom_types (id);
alter table base.classrooms add constraint fk_p169e84csib3wbj8ipuh3omkg foreign key (building_id) references base.buildings (id);
alter table base.classrooms add constraint fk_stm3c7u1s7l0t42gywsldaani foreign key (school_id) references base.schools (id);
alter table base.classrooms add constraint fk_t6niv5yo6vnehxiyo4ytsj89q foreign key (campus_id) references base.campuses (id);
alter table base.classrooms_departs add constraint fk_66jig0x1pq60vdw4g2433bqwv foreign key (department_id) references base.departments (id);
alter table base.classrooms_departs add constraint fk_9fufvmcp215te5k0etf63xy6a foreign key (classroom_id) references base.classrooms (id);
alter table base.classrooms_projects add constraint fk_fgiktidt9t5160vtodc3olj5j foreign key (classroom_id) references base.classrooms (id);
alter table base.classrooms_projects add constraint fk_i4kfwi4ifex3emo0xsda5iuk1 foreign key (project_id) references base.projects (id);
alter table base.course_awards add constraint fk_ax7vg55h5crfmeuxvknyl6pgy foreign key (course_id) references base.courses (id);
alter table base.course_awards add constraint fk_e6hhmt1rl0hcrgff6jn3wg48w foreign key (award_type_id) references code.course_award_types (id);
alter table base.course_clusters add constraint fk_s3wlxtejuii2qiubn7r49ichl foreign key (project_id) references base.projects (id);
alter table base.course_directors add constraint fk_3r22lpgi9f6gf02aodiuq1pkm foreign key (director_id) references base.teachers (id);
alter table base.course_directors add constraint fk_dy66gt32lifunpg0v3ukv8b5x foreign key (course_id) references base.courses (id);
alter table base.course_directors add constraint fk_jsdext3h87fmlggjwx98prjuj foreign key (office_id) references base.teaching_offices (id);
alter table base.course_hours add constraint fk_26355d0ox80bmneebjuhwfpi8 foreign key (course_id) references base.courses (id);
alter table base.course_hours add constraint fk_bfesrj36c41lrl4qaya5tt2l7 foreign key (nature_id) references code.teaching_natures (id);
alter table base.course_journal_hours add constraint fk_3g22ci8gemkcmatixwx8b55v4 foreign key (journal_id) references base.course_journals (id);
alter table base.course_journal_hours add constraint fk_sw2xt1t4sfo7csdpnpoqink66 foreign key (nature_id) references code.teaching_natures (id);
alter table base.course_journals add constraint fk_7wbxgtnbiskdo1yudf1u0m22w foreign key (department_id) references base.departments (id);
alter table base.course_journals add constraint fk_ifs9452ityx8mgd2ex4dghhuv foreign key (course_id) references base.courses (id);
alter table base.course_journals add constraint fk_wl82w2eiwtrqt6hu3n1531l9 foreign key (exam_mode_id) references code.exam_modes (id);
alter table base.course_journals_tags add constraint fk_6f95s2i987nm7hqwj2nqdwxih foreign key (course_tag_id) references code.course_tags (id);
alter table base.course_journals_tags add constraint fk_r2phyx0i8jsm70swiqwdkqp76 foreign key (course_journal_id) references base.course_journals (id);
alter table base.course_levels add constraint fk_8bytgma8rd50gcy7hrdk094hr foreign key (course_id) references base.courses (id);
alter table base.course_levels add constraint fk_9pbuxh67utphuhx8xw028mec1 foreign key (level_id) references code.education_levels (id);
alter table base.course_majors add constraint fk_5ijsyf1kknr9n30rpna270ajp foreign key (major_id) references base.majors (id);
alter table base.course_majors add constraint fk_flh07lfw46cnd98rmjnr3xfll foreign key (direction_id) references base.major_direction_journals (id);
alter table base.course_majors add constraint fk_jluiaqhjrjdu4ie57mry0lufc foreign key (course_id) references base.courses (id);
alter table base.course_profiles add constraint fk_25kdc0r4p0rcm92bxatx8oehu foreign key (director_id) references base.teachers (id);
alter table base.course_profiles add constraint fk_635e263hw0c3erxkus9fe4ndr foreign key (category_id) references code.course_categories (id);
alter table base.course_profiles add constraint fk_7did5f00gvtgft87jqveuveon foreign key (department_id) references base.departments (id);
alter table base.course_profiles add constraint fk_agtty6gn7mb3bvte5qbdeaof1 foreign key (writer_id) references base.users (id);
alter table base.course_profiles add constraint fk_iwy7pjla6fga45ss6kq2uv3q6 foreign key (auditor_id) references base.users (id);
alter table base.course_profiles add constraint fk_kw6uenienmdqnf98csgcntf0m foreign key (course_id) references base.courses (id);
alter table base.course_profiles add constraint fk_oy1dk1d3542ssfoij0kt717xl foreign key (semester_id) references base.semesters (id);
alter table base.course_profiles_books add constraint fk_cj7moo3jd8hjihwqaw8p3nfdi foreign key (textbook_id) references base.textbooks (id);
alter table base.course_profiles_books add constraint fk_ec8h93pedbvuk37imgo1q4r02 foreign key (course_profile_id) references base.course_profiles (id);
alter table base.course_textbooks add constraint fk_4stnq1rke2gsqq6ltx8k0n5yl foreign key (textbook_id) references base.textbooks (id);
alter table base.course_textbooks add constraint fk_qh2cf5dfbnaqunjflbooxg5e foreign key (course_id) references base.courses (id);
alter table base.course_units add constraint fk_pnnr46j0pw0nwn4w1ub9w63xg foreign key (part_id) references code.day_parts (id);
alter table base.course_units add constraint fk_qeu4ttiib1mtio9e3lkfnu7om foreign key (setting_id) references base.time_settings (id);
alter table base.courses add constraint fk_4f3etk0ltox5d1s1fwcrvqw9f foreign key (course_type_id) references code.course_types (id);
alter table base.courses add constraint fk_6iin27c8tr78rl3ea1ybw0fai foreign key (nature_id) references code.course_natures (id);
alter table base.courses add constraint fk_b3oqgd1pw427cuyrtoi5c3794 foreign key (cluster_id) references base.course_clusters (id);
alter table base.courses add constraint fk_dn65sxi9lag9qquiqhxbyy96h foreign key (project_id) references base.projects (id);
alter table base.courses add constraint fk_fc5thepipnuxwrkelcyiteyr foreign key (rank_id) references code.course_ranks (id);
alter table base.courses add constraint fk_gk09g3jc7vtceqa8tsav91s2o foreign key (module_id) references code.course_modules (id);
alter table base.courses add constraint fk_hkxhoxmx3qlj6b794cpd2qygl foreign key (grading_mode_id) references code.grading_modes (id);
alter table base.courses add constraint fk_ookm209qceyacbwgkhs83iubj foreign key (exam_mode_id) references code.exam_modes (id);
alter table base.courses add constraint fk_sv2mdywju86wq12x4did4xd78 foreign key (department_id) references base.departments (id);
alter table base.courses_categories add constraint fk_3b0bydvq4epcc03soryfs3ny2 foreign key (course_id) references base.courses (id);
alter table base.courses_categories add constraint fk_4424ctb42s6tah056jxicxjte foreign key (course_category_id) references code.course_categories (id);
alter table base.courses_tags add constraint fk_65r8l9b82e7ervbu7wijui68c foreign key (course_id) references base.courses (id);
alter table base.courses_tags add constraint fk_goebdflj73egcv00l2y3cio1d foreign key (course_tag_id) references code.course_tags (id);
alter table base.departments add constraint fk_63q917a0aq92i7gcw6h7f1jrv foreign key (parent_id) references base.departments (id);
alter table base.departments add constraint fk_8ouv4m3l92m888dhiwaoqesb0 foreign key (category_id) references code.department_categories (id);
alter table base.departments add constraint fk_9fwvupr4xfhftlrl40k0ga8u5 foreign key (school_id) references base.schools (id);
alter table base.departments_campuses add constraint fk_i37mcpntcm0xqxbuf3fn3nrqr foreign key (campus_id) references base.campuses (id);
alter table base.departments_campuses add constraint fk_rc4icj2rppwa8r7p4e4afja9d foreign key (department_id) references base.departments (id);
alter table base.devices add constraint fk_dnkla0ytc6j9494sxoe0gib62 foreign key (room_id) references base.classrooms (id);
alter table base.devices add constraint fk_nxql64rw79jcil0iuomve9uhv foreign key (school_id) references base.schools (id);
alter table base.devices add constraint fk_thsup9yv35eehh6hkt0jj3naw foreign key (device_type_id) references code.device_types (id);
alter table base.experiments add constraint fk_bsj5luxworu1ale3fq4bv5m7h foreign key (experiment_type_id) references code.experiment_types (id);
alter table base.experiments add constraint fk_cnbo41vj9grh5xljkjie3jiw5 foreign key (course_id) references base.courses (id);
alter table base.experiments add constraint fk_qdjbtewk6kkhmrrlcxkrr6h6 foreign key (category_id) references code.experiment_categories (id);
alter table base.experiments add constraint fk_syicnxr0u0po3ou1cf9l1n1so foreign key (discipline_id) references code.level1_disciplines (id);
alter table base.extern_students add constraint fk_3usviprn8dsc9ijub6cmcmbth foreign key (category_id) references code.edu_categories (id);
alter table base.extern_students add constraint fk_72qs067x5tver8fwgswox3uxo foreign key (level_id) references code.education_levels (id);
alter table base.extern_students add constraint fk_73qry92mvkc1fv4j33nj5iql4 foreign key (std_id) references base.students (id);
alter table base.extern_students add constraint fk_efrg5chq3towgpn58jpn1pilg foreign key (school_id) references base.extern_schools (id);
alter table base.grades add constraint fk_c5pd2itolffdn5wnq0mgj2al7 foreign key (project_id) references base.projects (id);
alter table base.graduate_seasons add constraint fk_sirab0a65iwy1a8qrav7i2xlx foreign key (project_id) references base.projects (id);
alter table base.graduates add constraint fk_6fmr58eco50970xrvd27gqkwi foreign key (whereto_go_id) references code.whereto_goes (id);
alter table base.graduates add constraint fk_6mmrw1h7ccsfo6ee9qaq49na8 foreign key (std_id) references base.students (id);
alter table base.graduates add constraint fk_dw10v5hdljxykc44xobj5yf6f foreign key (season_id) references base.graduate_seasons (id);
alter table base.graduates add constraint fk_k0ujdanl9irk6tw9iasmm2oo1 foreign key (degree_id) references code.degrees (id);
alter table base.graduates add constraint fk_qgtmcqt7yo0s9d8oaheoh193o foreign key (result_id) references code.education_results (id);
alter table base.holidays add constraint fk_gm32jevhgjqqdwyyh5y45g3ww foreign key (project_id) references base.projects (id);
alter table base.lab_centers add constraint fk_4gehni8ckjboarc3jb5drcnsr foreign key (school_id) references base.schools (id);
alter table base.lab_centers_departs add constraint fk_1lxpxbd5dlhuv0jy2jj52tlpa foreign key (lab_center_id) references base.lab_centers (id);
alter table base.lab_centers_departs add constraint fk_mdfbmfmy1kb83j3j83e6cqbse foreign key (department_id) references base.departments (id);
alter table base.laboratories add constraint fk_j94hdmq0cx18wd3kvbvwvn4vn foreign key (school_id) references base.schools (id);
alter table base.laboratories add constraint fk_ngw65r8tuth5tpr6ox5r0m3kk foreign key (room_id) references base.classrooms (id);
alter table base.major_direction_journals add constraint fk_9d8mhnt04to391tmk3985v4xl foreign key (direction_id) references base.major_directions (id);
alter table base.major_direction_journals add constraint fk_if24icvx7jdugfwtcgjam9bsd foreign key (depart_id) references base.departments (id);
alter table base.major_direction_journals add constraint fk_kb75htk9sv6my09hymyi5xikm foreign key (level_id) references code.education_levels (id);
alter table base.major_directions add constraint fk_itrjxecsvxwe67csfiow545gd foreign key (project_id) references base.projects (id);
alter table base.major_directions add constraint fk_mnbnx3fpg2h0v1qhf6he1iwmv foreign key (major_id) references base.majors (id);
alter table base.major_directors add constraint fk_br49mrm9gwp4ktx7hb4e753x7 foreign key (director_id) references base.teachers (id);
alter table base.major_directors add constraint fk_i5iiis1fbmi3kg9n8m71syp1y foreign key (major_id) references base.majors (id);
alter table base.major_directors add constraint fk_lcjjujsk43xp8ah7qht7sd1dh foreign key (level_id) references code.education_levels (id);
alter table base.major_directors add constraint fk_msjlnav2yh332hh5k8xs68axb foreign key (direction_id) references base.major_directions (id);
alter table base.major_disciplines add constraint fk_1ns1dxwd79d48v5qljk2nd6d1 foreign key (major_id) references base.majors (id);
alter table base.major_disciplines add constraint fk_b4yhoqxpu0fanq9eyy8f682vt foreign key (category_id) references code.discipline_categories (id);
alter table base.major_graduate_objectives add constraint fk_g3axxejhfrl2khedqe6n6f2ns foreign key (objective_id) references code.graduate_objectives (id);
alter table base.major_graduate_objectives add constraint fk_nghtoiohu7n6rh2xtxk1i3x5d foreign key (major_id) references base.majors (id);
alter table base.major_journals add constraint fk_5y6qu3oii0lk8du4vo8rboip foreign key (depart_id) references base.departments (id);
alter table base.major_journals add constraint fk_j1jxeru1xpm953ewunibi2htw foreign key (major_id) references base.majors (id);
alter table base.major_journals add constraint fk_o16xvcdeq4iw7jspvjpj4dcbq foreign key (level_id) references code.education_levels (id);
alter table base.majors add constraint fk_4ppy0o5tgdd4wj0jqie565ldt foreign key (project_id) references base.projects (id);
alter table base.mentors add constraint fk_k0d34aymx5fy7eg8auntch3sy foreign key (staff_id) references base.staffs (id);
alter table base.mentors_projects add constraint fk_28tn4tnjdjf7a8f3bk4guohno foreign key (project_id) references base.projects (id);
alter table base.mentors_projects add constraint fk_435ph07t4g90f2r8hxiyk3mqp foreign key (mentor_id) references base.mentors (id);
alter table base.minor_majors add constraint fk_3k2i9viyjisal7ne8ukvbigur foreign key (department_id) references base.departments (id);
alter table base.minor_majors add constraint fk_7nykr3h6yq9l7larsbsil1lbi foreign key (project_id) references base.projects (id);
alter table base.minor_majors add constraint fk_dpl4nixoo7au7l7cn8trnyov1 foreign key (major_id) references base.majors (id);
alter table base.minor_majors add constraint fk_ke4umnne27kyiri86a5xh8cao foreign key (institution_id) references code.institutions (id);
alter table base.minor_majors add constraint fk_scxbu2r3m4h8enodix43iqufy foreign key (category_id) references code.discipline_categories (id);
alter table base.officials add constraint fk_aj2by4og6cnn9vkvffmngr77g foreign key (department_id) references base.departments (id);
alter table base.officials add constraint fk_ehtnbb858qli3rh3c3vklahci foreign key (staff_id) references base.staffs (id);
alter table base.people add constraint fk_13h9b1i9rv6nbgtmur8l48nt8 foreign key (religion_id) references code.religions (id);
alter table base.people add constraint fk_90csifbkadfg0r9i15ja4i564 foreign key (country_id) references code.countries (id);
alter table base.people add constraint fk_kop4wnexs8li6lquv4n12le69 foreign key (political_status_id) references code.political_statuses (id);
alter table base.people add constraint fk_lv7iiaio9f3q8d76ljoi1t8r9 foreign key (nation_id) references code.nations (id);
alter table base.people add constraint fk_o17jeffphuaspavcmd1ad0bhb foreign key (id_type_id) references code.id_types (id);
alter table base.people add constraint fk_oc3i2nyu6m10t9mhggo3q23h1 foreign key (gender_id) references code.genders (id);
alter table base.people add constraint fk_qu9yxc8l50o3wk80guysv2glg foreign key (language_id) references code.languages (id);
alter table base.people add constraint fk_r8r7svcudbl3vg24u40ifx94a foreign key (compatriot_type_id) references code.compatriot_types (id);
alter table base.presidents add constraint fk_cuu0xfncdxdq3peluf04grdax foreign key (school_id) references base.schools (id);
alter table base.project_codes add constraint fk_6co7o6oypbttwwbgls2mrymcn foreign key (project_id) references base.projects (id);
alter table base.project_properties add constraint fk_lf8vnssrqpnwfk9lq9vakkmt6 foreign key (project_id) references base.projects (id);
alter table base.projects add constraint fk_2ely3u2yvcgd00u5phw3htocy foreign key (school_id) references base.schools (id);
alter table base.projects add constraint fk_qaxsrgi2qwv4tap2mfb9ca7i6 foreign key (category_id) references code.edu_categories (id);
alter table base.projects add constraint fk_stekawubheoexvpodfhpi4rfq foreign key (calendar_id) references base.calendars (id);
alter table base.projects_campuses add constraint fk_qe2r8f3tsmhsos6vg3obva8wa foreign key (project_id) references base.projects (id);
alter table base.projects_campuses add constraint fk_rjaoqo25gu97e5w74a5pfp8iy foreign key (campus_id) references base.campuses (id);
alter table base.projects_departments add constraint fk_7p8acb49fqug494l5r40ojsfk foreign key (project_id) references base.projects (id);
alter table base.projects_departments add constraint fk_opg6c3iohqoqcpoj9c6n5vvf7 foreign key (department_id) references base.departments (id);
alter table base.projects_edu_types add constraint fk_14ndt207p000hklq16klfv95 foreign key (education_type_id) references code.education_types (id);
alter table base.projects_edu_types add constraint fk_enkev9tonpxja5hipw919c0wt foreign key (project_id) references base.projects (id);
alter table base.projects_levels add constraint fk_o5yqmhaha9wev6gdpiax57p0c foreign key (project_id) references base.projects (id);
alter table base.projects_levels add constraint fk_qjrpjhqmguwb8j88llgnaqlnj foreign key (education_level_id) references code.education_levels (id);
alter table base.projects_std_labels add constraint fk_dcpjlmeaqxrj40dq24wvwb4f0 foreign key (std_label_id) references code.std_labels (id);
alter table base.projects_std_labels add constraint fk_t54ayk37ucu3heamugvx2pd07 foreign key (project_id) references base.projects (id);
alter table base.projects_std_types add constraint fk_cna2cm5v9icunnog5fa81lxbe foreign key (project_id) references base.projects (id);
alter table base.projects_std_types add constraint fk_olrajh8ob0f8bqp653n0ohb3u foreign key (std_type_id) references code.std_types (id);
alter table base.rooms add constraint fk_2y5tff2lifa7321sroti7vcrd foreign key (school_id) references base.schools (id);
alter table base.rooms add constraint fk_h9m2n1paq5hmd3u0klfl7wsfv foreign key (room_type_id) references code.room_types (id);
alter table base.rooms add constraint fk_jr5x5p0xgqty72s9np3c0awgt foreign key (campus_id) references base.campuses (id);
alter table base.rooms add constraint fk_mnnwsm0xvdd30vps6hpm92nm6 foreign key (department_id) references base.departments (id);
alter table base.rooms add constraint fk_ojgn0sxhkfxd7pmmojnem9r4q foreign key (building_id) references base.buildings (id);
alter table base.school_lengths add constraint fk_87mhgodwqfrpxle8d86utpq7f foreign key (level_id) references code.education_levels (id);
alter table base.school_lengths add constraint fk_j1yagjj51c2c0kawbwj0id46w foreign key (to_grade_id) references base.grades (id);
alter table base.school_lengths add constraint fk_lff6u1b9psve5syx6ptggugl5 foreign key (major_id) references base.majors (id);
alter table base.school_lengths add constraint fk_ny033y7pameoqo6j69sw3xguk foreign key (from_grade_id) references base.grades (id);
alter table base.school_years add constraint fk_985wpou25j9ln7eqhx78pkkxr foreign key (calendar_id) references base.calendars (id);
alter table base.schools add constraint fk_ewpo25xxpkxlls6vv52k62vi8 foreign key (category_id) references code.institution_categories (id);
alter table base.schools add constraint fk_g91v3wtr0hm2wnlhslybilkph foreign key (institution_id) references code.institutions (id);
alter table base.schools add constraint fk_i0amwk9vd4lhgjtb2c943edtf foreign key (division_id) references code.divisions (id);
alter table base.secretaries add constraint fk_t22af1eygk5b942whkte0ldoq foreign key (staff_id) references base.staffs (id);
alter table base.secretaries_projects add constraint fk_2tbh920jwj61fnm05vr4tdfbb foreign key (project_id) references base.projects (id);
alter table base.secretaries_projects add constraint fk_gcpfs8f8p5i6d24j2wl0vvn3w foreign key (secretary_id) references base.secretaries (id);
alter table base.semester_stages add constraint fk_jl04jvpom0k6wop7nh1eh3fse foreign key (semester_id) references base.semesters (id);
alter table base.semester_stages add constraint fk_ngksdip5d5pfa6ucc660pc4fa foreign key (stage_id) references base.calendar_stages (id);
alter table base.semesters add constraint fk_96a1r6k5ai5b4h27k6h5jqo08 foreign key (calendar_id) references base.calendars (id);
alter table base.semesters add constraint fk_rctbi42phvs26hbnar00a3d02 foreign key (year_id) references base.school_years (id);
alter table base.squads add constraint fk_2gqdloedvlxm4cl6xvj0ev220 foreign key (master_id) references base.staffs (id);
alter table base.squads add constraint fk_4nkh1bjskjmir3iv08n49avbb foreign key (edu_type_id) references code.education_types (id);
alter table base.squads add constraint fk_8fur0h2tnvx1mhy44poh4uog6 foreign key (mentor_id) references base.staffs (id);
alter table base.squads add constraint fk_cbc7gyc1oytyxlifio1otlutw foreign key (department_id) references base.departments (id);
alter table base.squads add constraint fk_kvbsin3fs2henvplgf59wahyy foreign key (grade_id) references base.grades (id);
alter table base.squads add constraint fk_lux1v41xj08wgxp5cywf8as9v foreign key (campus_id) references base.campuses (id);
alter table base.squads add constraint fk_mthg4d2ylm6grwnnmuuqmn99e foreign key (project_id) references base.projects (id);
alter table base.squads add constraint fk_pk1nvace8ivpnnkj0c9papdkk foreign key (level_id) references code.education_levels (id);
alter table base.squads add constraint fk_q689ly0bsktcs9d2e27uwljoj foreign key (major_id) references base.majors (id);
alter table base.squads add constraint fk_r1dr3sybe2d2yi9oqbo2ib7gx foreign key (std_type_id) references code.std_types (id);
alter table base.squads add constraint fk_sd0ee7oskskwk32u6blvt392c foreign key (direction_id) references base.major_directions (id);
alter table base.staff_profiles add constraint fk_qk6r47uhwdy9ty34u8pw1xmq8 foreign key (staff_id) references base.staffs (id);
alter table base.staff_titles add constraint fk_3v4frvos40y5dvq66bpsfhxe2 foreign key (title_id) references code.professional_titles (id);
alter table base.staff_titles add constraint fk_h8t6o5g3c3j5jao0pt59a7vdu foreign key (staff_id) references base.staffs (id);
alter table base.staffs add constraint fk_1fvbesq01b23ayv2ksysfhf6j foreign key (department_id) references base.departments (id);
alter table base.staffs add constraint fk_2u3t8cl01jfs8hjany7joi616 foreign key (tutor_type_id) references code.tutor_types (id);
alter table base.staffs add constraint fk_420icw78jj3rsu1i16hgkxsry foreign key (degree_id) references code.degrees (id);
alter table base.staffs add constraint fk_7fi8qjxmgmkp1ideqkdpvfsxy foreign key (school_id) references base.schools (id);
alter table base.staffs add constraint fk_adnalkarjsuc6ea1orayn7fxl foreign key (nation_id) references code.nations (id);
alter table base.staffs add constraint fk_d90vgr3jj7o5ue23gk796a6uq foreign key (title_id) references code.professional_titles (id);
alter table base.staffs add constraint fk_e3cvddfl42pgisf9vt4wjanji foreign key (education_degree_id) references code.education_degrees (id);
alter table base.staffs add constraint fk_eule2gkjbra9etfa0tm7qcsxd foreign key (id_type_id) references code.id_types (id);
alter table base.staffs add constraint fk_hgomx5css6ae570euyh78c1cu foreign key (gender_id) references code.genders (id);
alter table base.staffs add constraint fk_ipkufpinodstkxuyxrirqo8bk foreign key (staff_type_id) references code.staff_types (id);
alter table base.staffs add constraint fk_kcmhcp000r933mi2jk9wm6ns foreign key (status_id) references code.work_statuses (id);
alter table base.staffs add constraint fk_mk2ysra7xf1kxck41linp1pc foreign key (political_status_id) references code.political_statuses (id);
alter table base.staffs add constraint fk_rswm63aod14l5g97k66xlnlo0 foreign key (degree_level_id) references code.degree_levels (id);
alter table base.student_states add constraint fk_9dph1o1jfrggtf0h6entne8vr foreign key (squad_id) references base.squads (id);
alter table base.student_states add constraint fk_bt2cdywb7xkjao5qvlrhfor6g foreign key (status_id) references code.student_statuses (id);
alter table base.student_states add constraint fk_gjt9vh64u68nfesi42w6ql7tl foreign key (major_id) references base.majors (id);
alter table base.student_states add constraint fk_j1gq4ujv7im6c5u87f565w7ec foreign key (std_id) references base.students (id);
alter table base.student_states add constraint fk_jjg4851d7q2vlnh5hekqk2j7p foreign key (department_id) references base.departments (id);
alter table base.student_states add constraint fk_k341af534dyyjsy3g1md3kdcn foreign key (direction_id) references base.major_directions (id);
alter table base.student_states add constraint fk_r61kwh7jc5qcqmgpe2hcuwehr foreign key (campus_id) references base.campuses (id);
alter table base.student_states add constraint fk_r7mo41ef1b8jijc798wqqgu8n foreign key (grade_id) references base.grades (id);
alter table base.student_tutors add constraint fk_4i4sx6r8cxr1rmk7iy3v3b2ma foreign key (std_id) references base.students (id);
alter table base.student_tutors add constraint fk_9ghft00b7yskfgjjqqsdwathl foreign key (tutor_id) references base.teachers (id);
alter table base.students add constraint fk_6d9gurs0fdamr1cdg06sekvge foreign key (gender_id) references code.genders (id);
alter table base.students add constraint fk_9x7brwurtag62dg4e4eugfaf0 foreign key (person_id) references base.people (id);
alter table base.students add constraint fk_ckx8nxa2wus0fx409kf9yxml1 foreign key (std_type_id) references code.std_types (id);
alter table base.students add constraint fk_dt1cjx5ve5bdabmuuf3ibrwaq foreign key (user_id) references base.users (id);
alter table base.students add constraint fk_fpvosmoocxrxvxmr4pc4jd5nd foreign key (edu_type_id) references code.education_types (id);
alter table base.students add constraint fk_iwt6av1g9bak73nt4sdnyy2t4 foreign key (state_id) references base.student_states (id);
alter table base.students add constraint fk_lgxtshwn0g0yrwutfpdkfmmgx foreign key (level_id) references code.education_levels (id);
alter table base.students add constraint fk_seph3g6kdeo8x7l5nrtr7c2el foreign key (project_id) references base.projects (id);
alter table base.students add constraint fk_tfbg32pgto2ksy4nws646hyo2 foreign key (study_type_id) references code.study_types (id);
alter table base.students_labels add constraint fk_2v43w44u5u61untk5urgkct01 foreign key (std_label_id) references code.std_labels (id);
alter table base.students_labels add constraint fk_byw2a2hhhp128t9jndxk1epef foreign key (student_id) references base.students (id);
alter table base.teachers add constraint fk_h27qm9neekoyt5bgwk3g6hfe1 foreign key (staff_id) references base.staffs (id);
alter table base.teachers add constraint fk_jwai2tgrgosk1qdcni108ypjb foreign key (office_id) references base.teaching_offices (id);
alter table base.teachers add constraint fk_rgr03njnvpwuktc0mntf8t6o0 foreign key (department_id) references base.departments (id);
alter table base.teachers_campuses add constraint fk_c7568hv5ynsgpqmlfbj2wbcsu foreign key (teacher_id) references base.teachers (id);
alter table base.teachers_campuses add constraint fk_sk6jql49souyqxgd39uregta6 foreign key (campus_id) references base.campuses (id);
alter table base.teachers_projects add constraint fk_7yto5qcqlg6uvluupiche0ub9 foreign key (teacher_id) references base.teachers (id);
alter table base.teachers_projects add constraint fk_sxnuy9llj90w0sxmvtcnl0ll4 foreign key (project_id) references base.projects (id);
alter table base.teaching_offices add constraint fk_9aiu9ms7tyokkpis5dsmljs14 foreign key (department_id) references base.departments (id);
alter table base.teaching_offices add constraint fk_9sd1w2l7wdgw4xpaubvuk2948 foreign key (project_id) references base.projects (id);
alter table base.teaching_offices add constraint fk_j6lbhujiysv22jsqq6yyw3tny foreign key (director_id) references base.teachers (id);
alter table base.textbooks add constraint fk_4lfclnxxs1r2tdedwgnvlrq20 foreign key (project_id) references base.projects (id);
alter table base.textbooks add constraint fk_4mqbsq2ipe8go0rxhpgvjpgqc foreign key (book_form_id) references code.textbook_forms (id);
alter table base.textbooks add constraint fk_7y6ogoixp5nlmhc0wnytv1voa foreign key (award_type_id) references code.book_award_types (id);
alter table base.textbooks add constraint fk_aftif3qqoxsrlj8mhemyeyy7c foreign key (category_id) references code.book_categories (id);
alter table base.textbooks add constraint fk_ek107pbph1mr10fq1j8utyjqn foreign key (book_type_id) references code.book_types (id);
alter table base.textbooks add constraint fk_h33rngxx01ex7ea8tb4xysiiy foreign key (foreign_book_type_id) references code.foreign_book_types (id);
alter table base.textbooks add constraint fk_kcen97hvqclls3daxbs8gwd03 foreign key (discipline_category_id) references code.discipline_categories (id);
alter table base.textbooks add constraint fk_l4j33r7sd6r0j9w6aryo7k117 foreign key (creator_id) references base.users (id);
alter table base.textbooks add constraint fk_qdcxrp51l0xy98kkhmut4prx7 foreign key (press_id) references code.presses (id);
alter table base.theses add constraint fk_45ed0que67j7gybjurqr8qku8 foreign key (thesis_type_id) references code.thesis_types (id);
alter table base.theses add constraint fk_9nyn3ylmfc0reag5iuy2nyqtm foreign key (source_id) references code.thesis_topic_sources (id);
alter table base.theses add constraint fk_j7kxlr162akb05faq2yrai6hg foreign key (std_id) references base.students (id);
alter table base.theses add constraint fk_oafq4q0wewve8islr8w6sk3r9 foreign key (language_id) references code.languages (id);
alter table base.time_settings add constraint fk_8mt611a97jxri4on34mhqh8ws foreign key (campus_id) references base.campuses (id);
alter table base.time_settings add constraint fk_n8jlm5qp6r5vedi81e77xjt64 foreign key (project_id) references base.projects (id);
alter table base.tutor_journals add constraint fk_jg5x47w71obyvh9uhfgh5l70m foreign key (staff_id) references base.staffs (id);
alter table base.tutor_journals add constraint fk_taqn2nd8jw64b2hilpx22wofm foreign key (tutor_type_id) references code.tutor_types (id);
alter table base.tutor_majors add constraint fk_3la34qsb7vinn23ls3v2aw3kd foreign key (level_id) references code.education_levels (id);
alter table base.tutor_majors add constraint fk_ahfteyvf8kfsph07oa5efi225 foreign key (grade_id) references base.grades (id);
alter table base.tutor_majors add constraint fk_o03mqi9gghvymej67sqa3lmn9 foreign key (major_id) references base.majors (id);
alter table base.tutor_majors add constraint fk_qk49ybofykqdejd70ynqnsxp5 foreign key (edu_type_id) references code.education_types (id);
alter table base.tutor_majors add constraint fk_r8chc8ye8heuxuoyx7gunhghg foreign key (staff_id) references base.staffs (id);
alter table base.tutor_majors_directions add constraint fk_ca7s2ggg6iad9yq9hv2k815eq foreign key (tutor_major_id) references base.tutor_majors (id);
alter table base.tutor_majors_directions add constraint fk_jv1yddxc5oejh7vb9ssjpohe8 foreign key (direction_id) references base.major_directions (id);
alter table base.user_group_members add constraint fk_2a4njyry37th1luw0b2ycpaip foreign key (user_id) references base.users (id);
alter table base.user_group_members add constraint fk_tojippg1wvsa2cybvlq4gbi4l foreign key (group_id) references base.user_groups (id);
alter table base.user_groups add constraint fk_iy0l5y1wvvx5ha19ag7pg2lvx foreign key (school_id) references base.schools (id);
alter table base.user_groups add constraint fk_p52a4ej904fycrv2r4us8grgr foreign key (manager_id) references base.users (id);
alter table base.user_groups add constraint fk_ps8lxr5y8ayileomp50g5p84v foreign key (parent_id) references base.user_groups (id);
alter table base.users add constraint fk_2e2079vao3svqhmmjkbafth32 foreign key (group_id) references base.user_groups (id);
alter table base.users add constraint fk_3gj5j7vnsoxf1wp9n5hsqdiq3 foreign key (school_id) references base.schools (id);
alter table base.users add constraint fk_6a5j932mtf9sqiiythm0ey6a2 foreign key (category_id) references code.user_categories (id);
alter table base.users add constraint fk_sbg59w8q63i0oo53rlgvlcnjq foreign key (department_id) references base.departments (id);
alter table base.users add constraint fk_tjqd54krxpiam3m1xb1mdp64f foreign key (gender_id) references code.genders (id);
alter table cfg.edu_cert_exempt_configs add constraint fk_l16k0x0yvca16wc1w09h8lcj foreign key (edu_type_id) references code.education_types (id);
alter table cfg.edu_cert_exempt_configs add constraint fk_n1x6fgny77oixcpqafim56c58 foreign key (project_id) references base.projects (id);
alter table cfg.edu_cert_exempt_configs_levels add constraint fk_9l4k70sid7r5y919hdv3mkr24 foreign key (education_level_id) references code.education_levels (id);
alter table cfg.edu_cert_exempt_configs_levels add constraint fk_hskk72xjk64g1vyv98ncdpl5 foreign key (cert_exempt_config_id) references cfg.edu_cert_exempt_configs (id);
alter table cfg.edu_cert_exempt_courses add constraint fk_3qnuh67mw6r2eb8m295jqny5t foreign key (cert_exempt_setting_id) references cfg.edu_cert_exempt_settings (id);
alter table cfg.edu_cert_exempt_courses add constraint fk_aok4oggm22xaigaujqpm4bglu foreign key (course_id) references base.courses (id);
alter table cfg.edu_cert_exempt_settings add constraint fk_1uj25k9nqyyrd5u9rrko4i670 foreign key (config_id) references cfg.edu_cert_exempt_configs (id);
alter table cfg.edu_cert_exempt_settings add constraint fk_73hwfytqrj7yva6f3s81rmf64 foreign key (audit_depart_id) references base.departments (id);
alter table cfg.edu_cert_exempt_settings add constraint fk_mf6bjngevpx36qeuk4x24bn81 foreign key (certificate_id) references code.certificates (id);
alter table cfg.edu_cert_signup_configs add constraint fk_gnk1ghrhqb99lc28kld8ydguo foreign key (project_id) references base.projects (id);
alter table cfg.edu_cert_signup_configs add constraint fk_rm2dbbsjhpg4cd6cofmsxdnp3 foreign key (semester_id) references base.semesters (id);
alter table cfg.edu_cert_signup_exclusives add constraint fk_ggpucvhvgjx1dukhe5k8csuju foreign key (cert_signup_setting_id) references cfg.edu_cert_signup_settings (id);
alter table cfg.edu_cert_signup_exclusives add constraint fk_hd0m27wydbl7ywwrypoci9hoj foreign key (certificate_id) references code.certificates (id);
alter table cfg.edu_cert_signup_scopes add constraint fk_cmh7apk9xmdmtxn9jvntbmy14 foreign key (level_id) references code.education_levels (id);
alter table cfg.edu_cert_signup_scopes add constraint fk_lrfxclfdfeuosif2f85oqetp9 foreign key (setting_id) references cfg.edu_cert_signup_settings (id);
alter table cfg.edu_cert_signup_settings add constraint fk_53onvig2c8k02kycslv0i5d1k foreign key (config_id) references cfg.edu_cert_signup_configs (id);
alter table cfg.edu_cert_signup_settings add constraint fk_c0glaqioqa5ivlrkwskc8i99p foreign key (certificate_id) references code.certificates (id);
alter table cfg.edu_cert_signup_settings add constraint fk_gy22styse7af96p3vtqfvm5ph foreign key (depends_on_id) references code.certificates (id);
alter table cfg.edu_exam_alloc_settings add constraint fk_fcebt7h8bcdiwi57mgl3pp6w foreign key (project_id) references base.projects (id);
alter table cfg.edu_exam_alloc_settings add constraint fk_g39lddbucncr234929q2l3mxk foreign key (exam_type_id) references code.exam_types (id);
alter table cfg.edu_exam_defer_settings add constraint fk_k4040od5g9n5xlfe8lye8ck8x foreign key (exam_type_id) references code.exam_types (id);
alter table cfg.edu_exam_defer_settings add constraint fk_wqldjh36yp77lxqx7v1s08ek foreign key (project_id) references base.projects (id);
alter table cfg.edu_factor_segments add constraint fk_85n99qkkm7bonnxtad8jgf09x foreign key (factor_id) references cfg.edu_capacity_factors (id);
alter table cfg.edu_grade_input_switches add constraint fk_hfi7rmiy109yoff4leqqmerkb foreign key (project_id) references base.projects (id);
alter table cfg.edu_grade_input_switches add constraint fk_hvtmwnqih986k1686xl2wx9tw foreign key (semester_id) references base.semesters (id);
alter table cfg.edu_grade_input_switches_types add constraint fk_i806yyepjg389evukxn00k15o foreign key (grade_input_switch_id) references cfg.edu_grade_input_switches (id);
alter table cfg.edu_grade_input_switches_types add constraint fk_rro4mivrh3od03b11d0wm53sv foreign key (grade_type_id) references code.grade_types (id);
alter table cfg.edu_grade_rate_configs add constraint fk_2fbmrcbbhou9i3pptqrhvan9q foreign key (project_id) references base.projects (id);
alter table cfg.edu_grade_rate_configs add constraint fk_g3qt5cnn0pk6tayfakxxxlqh foreign key (grading_mode_id) references code.grading_modes (id);
alter table cfg.edu_grade_rate_items add constraint fk_faq1e4sjiwq0odeogy3ek7esm foreign key (config_id) references cfg.edu_grade_rate_configs (id);
alter table cfg.edu_room_apply_depart_rooms add constraint fk_9o3tyk2s08h179hnfc40u8fwh foreign key (classroom_id) references base.classrooms (id);
alter table cfg.edu_room_apply_depart_rooms add constraint fk_olpxcjtmw6i8lukr4d2og4tfi foreign key (room_apply_depart_scope_id) references cfg.edu_room_apply_depart_scopes (id);
alter table cfg.edu_room_apply_depart_scopes add constraint fk_m8f4aq5dafs27ycnhwxxub27e foreign key (depart_id) references base.departments (id);
alter table cfg.edu_room_apply_reserved_times add constraint fk_4tw45x3o0c942156gw454t5l6 foreign key (building_id) references base.buildings (id);
alter table cfg.edu_room_apply_reserved_times add constraint fk_knplsa6y632k1d5wlu36sa6nf foreign key (campus_id) references base.campuses (id);
alter table cfg.edu_room_apply_reserved_times add constraint fk_nlyr6vk2utul3vhq75di8n6yo foreign key (school_id) references base.schools (id);
alter table cfg.edu_room_apply_settings add constraint fk_7wtdg0d0bv24k5i1og07ev6hl foreign key (school_id) references base.schools (id);
alter table cfg.edu_schedule_setting_departs add constraint fk_fsauo5ha9g4r5f8hc1nf9a5gj foreign key (setting_id) references cfg.edu_schedule_settings (id);
alter table cfg.edu_schedule_setting_departs add constraint fk_jn48owhfuqyl7fy5plom58anu foreign key (depart_id) references base.departments (id);
alter table cfg.edu_schedule_settings add constraint fk_25euy4tivhn4glkhyqpu3w368 foreign key (project_id) references base.projects (id);
alter table cfg.edu_schedule_settings add constraint fk_3c7rlgcygykfymnwphwhd4hmp foreign key (semester_id) references base.semesters (id);
alter table cfg.edu_transcript_templates add constraint fk_564817qn294n2pghryn985kyx foreign key (project_id) references base.projects (id);
alter table cfg.prac_ability_credit_configs add constraint fk_66b8b88y1rhgjmbykc4fanaj2 foreign key (project_id) references base.projects (id);
alter table cfg.prac_ability_credit_configs add constraint fk_hnpnj4e7vbvdi6fjcd0vtoahh foreign key (edu_type_id) references code.education_types (id);
alter table cfg.prac_ability_credit_configs_levels add constraint fk_1pivofma8ptl9lnue2qwq5ih1 foreign key (ability_credit_config_id) references cfg.prac_ability_credit_configs (id);
alter table cfg.prac_ability_credit_configs_levels add constraint fk_5nc52csjldidonqquope830e5 foreign key (education_level_id) references code.education_levels (id);
alter table cfg.prac_ability_credit_settings add constraint fk_80ramn6un2kwnkg8cg6p0gsj8 foreign key (config_id) references cfg.prac_ability_credit_configs (id);
alter table cfg.prac_ability_credit_settings add constraint fk_dsjnwjx5y4t8dautxnmcvy5p5 foreign key (audit_depart_id) references base.departments (id);
alter table cfg.prac_ability_credit_settings add constraint fk_tgj49l6vv9e45bxc4l0c7jxfb foreign key (certificate_id) references code.certificates (id);
alter table cfg.prac_ability_credit_settings_departs add constraint fk_8j1jy8s227hghchm381xi9kaq foreign key (ability_credit_setting_id) references cfg.prac_ability_credit_settings (id);
alter table cfg.prac_ability_credit_settings_departs add constraint fk_rccu5dxn6oot4d88c3y2fes8h foreign key (department_id) references base.departments (id);
alter table cfg.prac_ability_credit_settings_majors add constraint fk_2t94hfdckgc022x658hrwto3b foreign key (major_id) references base.majors (id);
alter table cfg.prac_ability_credit_settings_majors add constraint fk_2xoby5glg4f362igy1nb7m53s foreign key (ability_credit_setting_id) references cfg.prac_ability_credit_settings (id);
alter table cfg.qos_feedback_switches add constraint fk_h2chucffoa0crh5c9t8f2xw9y foreign key (project_id) references base.projects (id);
alter table cfg.qos_feedback_switches add constraint fk_j10004lbbmux3o8h3d2yqdv7y foreign key (semester_id) references base.semesters (id);
alter table cfg.qos_std_evaluate_switches add constraint fk_1e32626tegq3xg2xgdbcq65a6 foreign key (semester_id) references base.semesters (id);
alter table cfg.qos_std_evaluate_switches add constraint fk_jnc83fa0sgcy5rbi6p63qu48q foreign key (project_id) references base.projects (id);
alter table cfg.std_alter_configs add constraint fk_j42kib8a5iqlwlpradf2t8k9w foreign key (alter_type_id) references code.std_alter_types (id);
alter table cfg.std_alter_configs add constraint fk_j8grxvj752xly6qc8c2amx0pp foreign key (status_id) references code.student_statuses (id);
alter table cfg.std_alter_configs add constraint fk_psdba96tb131tqc8lpievfadj foreign key (project_id) references base.projects (id);
alter table cfg.std_archive_doc_settings add constraint fk_5v5hbujtev6txhxbrkknf4tc8 foreign key (project_id) references base.projects (id);
alter table cfg.std_archive_doc_settings add constraint fk_eru2pvypxdasm2q42gbqsfmv7 foreign key (doc_type_id) references code.std_doc_types (id);
alter table cfg.std_audit_settings add constraint fk_7a1325mn6knpmwqawtlsa61vm foreign key (project_id) references base.projects (id);
alter table cfg.std_audit_settings_levels add constraint fk_9wmc3gpjfs94ip7a3g6ethpkf foreign key (audit_setting_id) references cfg.std_audit_settings (id);
alter table cfg.std_audit_settings_levels add constraint fk_phmalq0nr1btsvy9c6rwsrcyx foreign key (education_level_id) references code.education_levels (id);
alter table cfg.std_register_sessions add constraint fk_h28tdmfwfv1m9d8qakqadowvc foreign key (project_id) references base.projects (id);
alter table cfg.std_register_sessions add constraint fk_hvxyk0duy5yf4cac9vrqtvx8r foreign key (level_id) references code.education_levels (id);
alter table cfg.std_register_sessions add constraint fk_i6h5l4gje0vo5dolmu8trkpf5 foreign key (semester_id) references base.semesters (id);
alter table cfg.std_spa_coupons add constraint fk_8vpjipn5i6jm2cynsqf2pojn2 foreign key (project_id) references base.projects (id);
alter table cfg.std_spa_coupons add constraint fk_hef4nmp3apd4qawmwclokvmhs foreign key (doc_type_id) references code.std_doc_types (id);
alter table cfg.std_spa_doc_settings add constraint fk_lhccqpl0427p8hsgufr4twvpn foreign key (doc_type_id) references code.std_doc_types (id);
alter table cfg.std_spa_doc_settings add constraint fk_q6k5kh8bg7mlal82iho8k9yxp foreign key (project_id) references base.projects (id);
alter table cfg.std_spa_print_configs add constraint fk_89m617x5msy0qqrkbktsclbr0 foreign key (doc_type_id) references code.std_doc_types (id);
alter table cfg.std_spa_print_configs add constraint fk_qu88uv1gge36lvo7bn4j8ka1v foreign key (project_id) references base.projects (id);
alter table cfg.std_transfer_options add constraint fk_2v73mp725t74g3csvwwjc8xy0 foreign key (major_id) references base.majors (id);
alter table cfg.std_transfer_options add constraint fk_8npryunke215hmw672f2otrcq foreign key (depart_id) references base.departments (id);
alter table cfg.std_transfer_options add constraint fk_8stidn7n3x6sb1btl5lsoiemi foreign key (manager_id) references base.users (id);
alter table cfg.std_transfer_options add constraint fk_a4lf9nb2e24ri1rwoatn7d579 foreign key (scheme_id) references cfg.std_transfer_schemes (id);
alter table cfg.std_transfer_options add constraint fk_lf810xhh00521b1vtyxsqbfkm foreign key (direction_id) references base.major_directions (id);
alter table cfg.std_transfer_schemes add constraint fk_9uxm8yrw4ku81he1q02smd7wg foreign key (semester_id) references base.semesters (id);
alter table cfg.std_transfer_schemes add constraint fk_pii2mow45j0ex720sp82h1egs foreign key (project_id) references base.projects (id);
alter table cfg.std_transfer_schemes add constraint fk_tqofhgwejrsrycs1noidct3tp foreign key (grade_id) references base.grades (id);
alter table cfg.std_transfer_scopes add constraint fk_ph8l7tccg2ri0d3vvohj07s83 foreign key (scheme_id) references cfg.std_transfer_schemes (id);
alter table cfg.std_transfer_scopes_grades add constraint fk_gn25joaupiuw7p15uq30528uj foreign key (transfer_scope_id) references cfg.std_transfer_scopes (id);
alter table cfg.std_transfer_scopes_majors add constraint fk_adrfxyttj736urgbngpxq5r6a foreign key (transfer_scope_id) references cfg.std_transfer_scopes (id);
alter table cfg.std_transfer_scopes_majors add constraint fk_muk85jom2dqvcfdd0pmje30iy foreign key (major_id) references base.majors (id);
alter table cfg.std_tuition_configs add constraint fk_68o9r25b7f4cnecm7bxk0vudq foreign key (project_id) references base.projects (id);
alter table cfg.std_tuition_configs add constraint fk_c8tgk2xfhwhhu63qq40n379hp foreign key (department_id) references base.departments (id);
alter table cfg.std_tuition_configs add constraint fk_cno1nanw99as90xj4ervtq7pn foreign key (fee_type_id) references code.fee_types (id);
alter table cfg.std_tuition_configs add constraint fk_dwu1k2bsqcb4ea13idcypn32s foreign key (from_grade_id) references base.grades (id);
alter table cfg.std_tuition_configs add constraint fk_hxlg5on74qg7manposlrjny5y foreign key (major_id) references base.majors (id);
alter table cfg.std_tuition_configs add constraint fk_l155d8839s6pwc90st13vl3iq foreign key (direction_id) references base.major_directions (id);
alter table cfg.std_tuition_configs add constraint fk_my1vcxs79ektt4fqd67qm3v7l foreign key (level_id) references code.education_levels (id);
alter table cfg.std_tuition_configs add constraint fk_ohd26mt89d8wxo0tqf10pp7n2 foreign key (to_grade_id) references base.grades (id);
alter table code.certificates add constraint fk_esh5jna9bcsijcdbupw12wocx foreign key (category_id) references code.certificate_categories (id);
alter table code.course_ability_rates add constraint fk_71dwis01s95gd1p5lu1h76737 foreign key (subject_id) references code.course_ability_subjects (id);
alter table code.course_award_types add constraint fk_p1i1dn7gojnu8mf3v9di6fypj foreign key (category_id) references code.course_award_categories (id);
alter table code.course_categories add constraint fk_c5k6uw6byn2wdwqo5in0bi5rf foreign key (parent_id) references code.course_categories (id);
alter table code.course_categories add constraint fk_dcguulpdpunq4d9j3eofi6i2w foreign key (dimension_id) references code.course_category_dimensions (id);
alter table code.course_types add constraint fk_5ufodafafis1r7h88r1mva11l foreign key (rank_id) references code.course_ranks (id);
alter table code.course_types add constraint fk_buyplucphy8v3df4dxorj0lj1 foreign key (module_id) references code.course_modules (id);
alter table code.course_types add constraint fk_smb9je2ssiv6o3gshdjvc5b42 foreign key (parent_id) references code.course_types (id);
alter table code.degrees add constraint fk_ggx3cc5jp7jo2u6g6anvuntrk foreign key (level_id) references code.degree_levels (id);
alter table code.department_categories add constraint fk_27atg8v8893nxuo8mod6iuc8x foreign key (parent_id) references code.department_categories (id);
alter table code.disciplines add constraint fk_450f1pic65rbe7fdobqnlesvu foreign key (catalog_id) references code.discipline_catalogs (id);
alter table code.disciplines add constraint fk_ppqr5tdr0ugyeacn692j1tpsh foreign key (category_id) references code.discipline_categories (id);
alter table code.divisions add constraint fk_97sm4solm6hajvo8du2qopoht foreign key (parent_id) references code.divisions (id);
alter table code.duty_grades add constraint fk_5p4215ynsvbx5dsjta7lyio8q foreign key (duty_type_id) references code.duty_types (id);
alter table code.education_degrees add constraint fk_5o2mlp0fjg7xgdmgfadnt46g8 foreign key (result_id) references code.education_results (id);
alter table code.education_degrees add constraint fk_ifwdqwmamdyu95e1onir7iesr foreign key (level_id) references code.academic_levels (id);
alter table code.education_levels add constraint fk_gp24wron3bs3tos9ykc2x3dt8 foreign key (to_level_id) references code.academic_levels (id);
alter table code.education_levels add constraint fk_gy6vfijmwfxxj8n98yklxibax foreign key (from_level_id) references code.academic_levels (id);
alter table code.grade_types add constraint fk_fjlag47fumfl93ltvr9i825pp foreign key (exam_type_id) references code.exam_types (id);
alter table code.level1_disciplines add constraint fk_pf209fc8t60gdq3omladrg0br foreign key (category_id) references code.discipline_categories (id);
alter table code.presses add constraint fk_5tnc7qqtci18xsxjaqu8yffxs foreign key (grade_id) references code.press_grades (id);
alter table code.professional_titles add constraint fk_iw0bv3csihm03js8h55dtdp56 foreign key (grade_id) references code.professional_grades (id);
alter table code.publications add constraint fk_r0suni42e42c2rmrqguvv9l90 foreign key (grade_id) references code.publication_grades (id);
alter table code.railway_stations add constraint fk_35n24s996ovtutjo31t3uy5i9 foreign key (division_id) references code.divisions (id);
alter table code.staff_source_types add constraint fk_rnymavikabd5h015rxix2u5r0 foreign key (parent_id) references code.staff_source_types (id);
alter table code.staff_types add constraint fk_lears29b5824e1p2j01yj69he foreign key (parent_id) references code.staff_types (id);
alter table code.std_labels add constraint fk_ngk79kdecg0l8rrcxqh2m0xrw foreign key (label_type_id) references code.std_label_types (id);
alter table code.std_practice_types add constraint fk_iq0202kvmg12e4g8in8uyq3wo foreign key (category_id) references code.std_practice_categories (id);
alter table degree.advisors add constraint fk_dhlvst3qo1fkrnevux2vuk7rp foreign key (teacher_id) references base.teachers (id);
alter table degree.advisors_departs add constraint fk_6rq1m36luj0swmnsy78pimewv foreign key (advisor_id) references degree.advisors (id);
alter table degree.advisors_departs add constraint fk_p5vfo3ltnf6s62kvgy1o9k79e foreign key (department_id) references base.departments (id);
alter table degree.blind_peer_reviews add constraint fk_8bns40rnfoo0nhiifqeh88d6x foreign key (writer_id) references degree.writers (id);
alter table degree.commitments add constraint fk_1b4mhvmej9lnvq4xdumr1osal foreign key (writer_id) references degree.writers (id);
alter table degree.copy_checks add constraint fk_tn8t920kwm913pbxf8lrdupmd foreign key (writer_id) references degree.writers (id);
alter table degree.deadlines add constraint fk_3fql61o01lvtup5g3esxqbnys foreign key (writer_id) references degree.writers (id);
alter table degree.defense_groups add constraint fk_bblt5qsfkebb4p5xlly6fkc6k foreign key (season_id) references base.graduate_seasons (id);
alter table degree.defense_groups add constraint fk_fkojfu5fmjsa4ca822e8icu3m foreign key (department_id) references base.departments (id);
alter table degree.defense_groups add constraint fk_jl7ecp66xtaeo33nq4a2tg1ch foreign key (office_id) references base.teaching_offices (id);
alter table degree.defense_groups add constraint fk_lrwip7jdw6mnv077u25eb4iq0 foreign key (secretary_id) references base.users (id);
alter table degree.defense_infoes add constraint fk_lth0vjshybn1lcojfrnt64oar foreign key (writer_id) references degree.writers (id);
alter table degree.defense_members add constraint fk_ier45xi9vue6sx0pqshg0qtb foreign key (group_id) references degree.defense_groups (id);
alter table degree.defense_members add constraint fk_rdkh52towwh12to6xfylcetcm foreign key (teacher_id) references base.teachers (id);
alter table degree.defense_notices add constraint fk_gxqckmchr5ghs2cp5w81nlmqa foreign key (group_id) references degree.defense_groups (id);
alter table degree.defense_writers add constraint fk_lqbvtaxtuph7lackx41erql8f foreign key (writer_id) references degree.writers (id);
alter table degree.defense_writers add constraint fk_n5x8eoilsfel12slkrtt3mx3q foreign key (group_id) references degree.defense_groups (id);
alter table degree.depart_plans add constraint fk_nc3sw7twvafsbdwg5xe95f5oj foreign key (thesis_plan_id) references degree.thesis_plans (id);
alter table degree.depart_plans add constraint fk_ng598vghism7qq8bptrdssaqr foreign key (department_id) references base.departments (id);
alter table degree.depart_plans_times add constraint fk_nso88cbxfj2pb7bof9xmfv8fi foreign key (depart_plan_id) references degree.depart_plans (id);
alter table degree.guidances add constraint fk_97iw0bu3guoo6hby3tuy1kfvn foreign key (writer_id) references degree.writers (id);
alter table degree.midterm_check_details add constraint fk_h4jhdlyrk5l4yp5w207bk2y19 foreign key (check_id) references degree.midterm_checks (id);
alter table degree.midterm_check_details add constraint fk_moyjny0di3gb7m1q6v9840rvk foreign key (item_id) references degree.midterm_check_items (id);
alter table degree.midterm_checks add constraint fk_jpkpmtn9skele9f4jkt6tp96u foreign key (writer_id) references degree.writers (id);
alter table degree.paper_submissions add constraint fk_3wf54web19sak0maud1ikoowq foreign key (writer_id) references degree.writers (id);
alter table degree.proposals add constraint fk_s8o538e18m5v7t3e4wormvua foreign key (writer_id) references degree.writers (id);
alter table degree.signatures add constraint fk_d6gcrfp182rnnrfkyg0n3ba4p foreign key (writer_id) references degree.writers (id);
alter table degree.subject_applies add constraint fk_1h3x33d5abw2pftxe34v96in2 foreign key (first_id) references degree.subjects (id);
alter table degree.subject_applies add constraint fk_cfeu7i5t3s86x7esnka48dnm2 foreign key (last_id) references degree.subjects (id);
alter table degree.subject_applies add constraint fk_q0opmok6cwbjm944pyx55t26d foreign key (writer_id) references degree.writers (id);
alter table degree.subject_applies add constraint fk_tlh61k9d2gss5fys2u1mbbvq0 foreign key (second_id) references degree.subjects (id);
alter table degree.subjects add constraint fk_5sbr9xv28euexe53tjw1um0x9 foreign key (season_id) references base.graduate_seasons (id);
alter table degree.subjects add constraint fk_ha8griwo62rg0sa2bvrfsfqal foreign key (depart_id) references base.departments (id);
alter table degree.subjects add constraint fk_iowxwhp5whqywbtdrfrwxy2w1 foreign key (advisor_id) references degree.advisors (id);
alter table degree.subjects_majors add constraint fk_e9xtd0e9eu0ik2orbkqbvhl6 foreign key (major_id) references base.majors (id);
alter table degree.subjects_majors add constraint fk_iclt5jg5lv3xrr2xdj0rog0xa foreign key (subject_id) references degree.subjects (id);
alter table degree.thesis_archives add constraint fk_4p85e25ge8xc27ttsh3rwsp1h foreign key (confirmed_by_id) references base.users (id);
alter table degree.thesis_archives add constraint fk_fxuk0v2lsfoy066si9g58awpo foreign key (writer_id) references degree.writers (id);
alter table degree.thesis_checks add constraint fk_15nlot5p3f4frhgl13rpt3e5m foreign key (cover_doc_id) references degree.thesis_docs (id);
alter table degree.thesis_checks add constraint fk_6emgfig7bqj088xanwrb5k735 foreign key (season_id) references base.graduate_seasons (id);
alter table degree.thesis_checks add constraint fk_7r7hal30aly581v98tjr77q4h foreign key (writer_id) references degree.writers (id);
alter table degree.thesis_checks add constraint fk_jl08bb9bx4xtmmqaq7iyapwjp foreign key (paper_doc_id) references degree.thesis_docs (id);
alter table degree.thesis_checks add constraint fk_n8mhag3ki0l5e61bfrv0xdmyi foreign key (language_id) references code.languages (id);
alter table degree.thesis_checks add constraint fk_qovasc4mkuhgo2smr4yg44iob foreign key (proposal_doc_id) references degree.thesis_docs (id);
alter table degree.thesis_checks add constraint fk_rm090hmlrmtac2o3clrn6q5ud foreign key (defense_doc_id) references degree.thesis_docs (id);
alter table degree.thesis_docs add constraint fk_ahcxfk3p5bedhayllqv34g946 foreign key (writer_id) references degree.writers (id);
alter table degree.thesis_docs add constraint fk_ltqh48smdu2d818y7akr7eqma foreign key (doc_type_id) references degree.thesis_doc_types (id);
alter table degree.thesis_papers add constraint fk_1hsyfo8bqkcf8195rsi41d4jq foreign key (language_id) references code.languages (id);
alter table degree.thesis_papers add constraint fk_1oew0ohd1n5m5wki3vxn3y59d foreign key (recheck_id) references degree.copy_checks (id);
alter table degree.thesis_papers add constraint fk_cvjiwisxnnlx5a7q7dx26w569 foreign key (writer_id) references degree.writers (id);
alter table degree.thesis_papers add constraint fk_e0y5ysja642tiddrdnckrhty9 foreign key (copy_check_id) references degree.copy_checks (id);
alter table degree.thesis_plans add constraint fk_f8ck4mx3ocua3woyhqumoh55b foreign key (project_id) references base.projects (id);
alter table degree.thesis_plans add constraint fk_h8iwqdttmdyulmnvpfei58qbk foreign key (season_id) references base.graduate_seasons (id);
alter table degree.thesis_plans_times add constraint fk_6rvfnp7hlctxiat319h751le2 foreign key (thesis_plan_id) references degree.thesis_plans (id);
alter table degree.thesis_reviews add constraint fk_1wwg73wddv3smikygormq9oac foreign key (cross_reviewer_id) references base.teachers (id);
alter table degree.thesis_reviews add constraint fk_fm35iv8s0vrddq2abc0jnpt4 foreign key (writer_id) references degree.writers (id);
alter table degree.thesis_reviews add constraint fk_jiv4484xisjxcpbscerv13tgi foreign key (defense_info_id) references degree.defense_infoes (id);
alter table degree.thesis_reviews add constraint fk_p4cwkm8clkna9hce1b74yym12 foreign key (cross_review_manager_id) references base.teachers (id);
alter table degree.writers add constraint fk_2v1d94tuy267k9epwofon37nx foreign key (season_id) references base.graduate_seasons (id);
alter table degree.writers add constraint fk_s1d0osd7bxpkgr9514gsshs0s foreign key (advisor_id) references degree.advisors (id);
alter table degree.writers add constraint fk_sp75hvrytpw8ewhr3upnj7b69 foreign key (std_id) references base.students (id);
alter table edu.attendances add constraint fk_3rkwlet3ptnhlhlrkhjy0o2u7 foreign key (semester_id) references base.semesters (id);
alter table edu.attendances add constraint fk_49hoae3rr0e03pgjx6red8665 foreign key (clazz_id) references edu.clazzes (id);
alter table edu.attendances add constraint fk_ejex8x13p9qoo55i6oqrmpvnd foreign key (std_id) references base.students (id);
alter table edu.audit_course_results add constraint fk_7h4mhuqxlovmwuklnie24ces5 foreign key (course_id) references base.courses (id);
alter table edu.audit_course_results add constraint fk_klucok7xe6txt0fuwn8c0dmw2 foreign key (group_result_id) references edu.audit_group_results (id);
alter table edu.audit_group_results add constraint fk_9s1c6lthsrdj3p9pp7c16don5 foreign key (course_type_id) references code.course_types (id);
alter table edu.audit_group_results add constraint fk_d3cyoyo0nubvnqix4i5b6wetq foreign key (rank_id) references code.course_ranks (id);
alter table edu.audit_group_results add constraint fk_iyi6xmtlaay2h1ffxj538htam foreign key (plan_result_id) references edu.audit_plan_results (id);
alter table edu.audit_group_results add constraint fk_o5t4yave4tu5dxcnpm2fiby3d foreign key (parent_id) references edu.audit_group_results (id);
alter table edu.audit_plan_results add constraint fk_9udjn6ysvs77vv7va1dtd43xp foreign key (std_id) references base.students (id);
alter table edu.cert_signups add constraint fk_bbwvkmuee7sqkxmv9ehfaig3f foreign key (std_id) references base.students (id);
alter table edu.cert_signups add constraint fk_feth7hq7yd7cumyml1ur0yvyq foreign key (certificate_id) references code.certificates (id);
alter table edu.cert_signups add constraint fk_iuwcqfqj72asuoguvjb0q1qr0 foreign key (semester_id) references base.semesters (id);
alter table edu.certificate_grades add constraint fk_864r6h3dw4j407l66tv9qq4m9 foreign key (grading_mode_id) references code.grading_modes (id);
alter table edu.certificate_grades add constraint fk_de32etjyyapt403pe5ey56m71 foreign key (certificate_id) references code.certificates (id);
alter table edu.certificate_grades add constraint fk_ecyrdmvdengs2cq51nvtrkvge foreign key (exam_status_id) references code.exam_statuses (id);
alter table edu.certificate_grades add constraint fk_i1gm7pa9f1701d8osdolmo478 foreign key (semester_id) references base.semesters (id);
alter table edu.certificate_grades add constraint fk_q6k0yumpiajuk0vo3nicmw6mn foreign key (std_id) references base.students (id);
alter table edu.certificate_grades_exempts add constraint fk_gam2oe68gq0asabsto04nb9ni foreign key (certificate_grade_id) references edu.certificate_grades (id);
alter table edu.certificate_grades_exempts add constraint fk_ik2tabqiufoqowx0ge4sha5rk foreign key (course_id) references base.courses (id);
alter table edu.clazz_activities add constraint fk_f6c5dken729a254255clywcw4 foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazz_activities add constraint fk_fh4pb8i5j89usvmgl1wqgji2e foreign key (nature_id) references code.teaching_natures (id);
alter table edu.clazz_activities add constraint fk_shdn2h3bwu9imnlrytj1vl3l2 foreign key (subclazz_id) references edu.subclazzes (id);
alter table edu.clazz_activities_rooms add constraint fk_2p7ikpukol4pwjx4sqwqha3pr foreign key (classroom_id) references base.classrooms (id);
alter table edu.clazz_activities_rooms add constraint fk_lo3w5ng35g751uq48dk7kod3 foreign key (activity_id) references edu.clazz_activities (id);
alter table edu.clazz_activities_teachers add constraint fk_56onq6rl18wnpj7ykkuus5l31 foreign key (activity_id) references edu.clazz_activities (id);
alter table edu.clazz_activities_teachers add constraint fk_kw6yqbrntwcb14olegfksq0r8 foreign key (teacher_id) references base.teachers (id);
alter table edu.clazz_archives add constraint fk_5rqvebyop21a4uouypp85qet9 foreign key (archived_by_id) references base.users (id);
alter table edu.clazz_archives add constraint fk_adclnnepw3n885amwtsltah8r foreign key (doc_id) references code.clazz_archive_docs (id);
alter table edu.clazz_archives add constraint fk_ebr6602e41pv8ybnuwwla44ol foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazz_book_stats add constraint fk_ofa77u9l6i9gfr4ysepbv5vph foreign key (textbook_id) references base.textbooks (id);
alter table edu.clazz_book_stats add constraint fk_sx0e0chgy9l6kb1v85s630tx7 foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazz_bulletins add constraint fk_8m1f71d3o4fxuou5hbhxpaei8 foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazz_docs add constraint fk_5b1bugqfdd2nt1f0ey767hoou foreign key (updated_by_id) references base.users (id);
alter table edu.clazz_docs add constraint fk_xst0f3n3d73sirr1dmbbalkc foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazz_final_exams add constraint fk_1im1uj0cfikxmqym4qme2nv2l foreign key (room_type_id) references code.classroom_types (id);
alter table edu.clazz_final_exams add constraint fk_8cpxkf5hybj84ya0io9shjhtm foreign key (exam_form_id) references code.exam_forms (id);
alter table edu.clazz_final_exams add constraint fk_t3fjgklrbsfs2u0vilt4yvoi4 foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazz_groups add constraint fk_bp32yts659i0g2bqsejvc8q56 foreign key (semester_id) references base.semesters (id);
alter table edu.clazz_groups add constraint fk_myqnc31ku366fbee01hkeobrl foreign key (project_id) references base.projects (id);
alter table edu.clazz_groups add constraint fk_n3c1ubsjxa095g7ql9mtuuidx foreign key (teach_depart_id) references base.departments (id);
alter table edu.clazz_groups add constraint fk_qvvy3qhierdlr43hcp995yxcp foreign key (course_id) references base.courses (id);
alter table edu.clazz_notice_files add constraint fk_s4pejjaormgirmxawvpjyofv9 foreign key (notice_id) references edu.clazz_notices (id);
alter table edu.clazz_notices add constraint fk_fxdtj5wxg9x5voej00ql1e5ck foreign key (updated_by_id) references base.users (id);
alter table edu.clazz_notices add constraint fk_oynlsgrdhhwo8rnkbgp7haljn foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazz_plans add constraint fk_3c5cf52a9jmvb2eja36eaotwq foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazz_plans add constraint fk_5q3lp8rbgpw8vo2lw62pnffks foreign key (office_id) references base.teaching_offices (id);
alter table edu.clazz_plans add constraint fk_9a47aiodlg2japl1ll1mfs9og foreign key (reviewer_id) references base.users (id);
alter table edu.clazz_plans add constraint fk_af6p5pte00l1mmb20yucmnj94 foreign key (semester_id) references base.semesters (id);
alter table edu.clazz_plans add constraint fk_ip9131nm7rtlr1taoynseb8dg foreign key (writer_id) references base.users (id);
alter table edu.clazz_plans add constraint fk_o7rl0r885jccp3kftqr91rerr foreign key (approver_id) references base.users (id);
alter table edu.clazz_programs add constraint fk_4crby07kat6870f1fywdjqfnb foreign key (writer_id) references base.users (id);
alter table edu.clazz_programs add constraint fk_h9ailuws5qiohxfl6gqmnww7h foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazz_programs add constraint fk_tph7qlshfbw43yu6olctyp9fy foreign key (semester_id) references base.semesters (id);
alter table edu.clazz_restriction_items add constraint fk_eekyqw15so4fi3t740wqi95hc foreign key (restriction_id) references edu.clazz_restrictions (id);
alter table edu.clazz_restrictions add constraint fk_85oovwocxi03vp3w18s3ue5js foreign key (parent_id) references edu.clazz_restrictions (id);
alter table edu.clazz_restrictions add constraint fk_8w9oito9q1cu0fj3ycg0qr54s foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazz_section_hours add constraint fk_d40x6s6siqd4g3gauyibn526i foreign key (plan_id) references edu.clazz_plans (id);
alter table edu.clazzes add constraint fk_10oiit4lpe9mkj7dhgm8dqh4p foreign key (room_type_id) references code.classroom_types (id);
alter table edu.clazzes add constraint fk_1brihu1u29o0h0rwyof7kgsug foreign key (teach_depart_id) references base.departments (id);
alter table edu.clazzes add constraint fk_4me0k9kach5poc785tr3uqnid foreign key (course_id) references base.courses (id);
alter table edu.clazzes add constraint fk_6mphnhqo0tvqpwjh74gaqth40 foreign key (semester_id) references base.semesters (id);
alter table edu.clazzes add constraint fk_bs614gilx7iajy7ughxjeus4v foreign key (depart_id) references base.departments (id);
alter table edu.clazzes add constraint fk_ja57a2e0464xn8trontkhjpmq foreign key (project_id) references base.projects (id);
alter table edu.clazzes add constraint fk_johck69naqsh1qoahc9tjnxlk foreign key (lang_type_id) references code.teach_lang_types (id);
alter table edu.clazzes add constraint fk_k1on3s0nstu9h5u88ebmxbrti foreign key (course_type_id) references code.course_types (id);
alter table edu.clazzes add constraint fk_m8wojifa5fnkdkbn9ddjic3qw foreign key (exam_mode_id) references code.exam_modes (id);
alter table edu.clazzes add constraint fk_nqgf0575169sy11uuq85nt6ly foreign key (campus_id) references base.campuses (id);
alter table edu.clazzes add constraint fk_sscc45j4np46bdjaflb5tk87f foreign key (group_id) references edu.clazz_groups (id);
alter table edu.clazzes_ability_rates add constraint fk_9x9tus6jwmygbpg7he75889wl foreign key (course_ability_rate_id) references code.course_ability_rates (id);
alter table edu.clazzes_ability_rates add constraint fk_b8unl65rdwbtkvgou7sf2s58r foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazzes_books add constraint fk_aa7corpgdoxtfdquwlxdc73n foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazzes_books add constraint fk_iqaoim3gfr6vl3ripj8p3mjjp foreign key (textbook_id) references base.textbooks (id);
alter table edu.clazzes_tags add constraint fk_32usku67c0t52k4a98glb3pbw foreign key (clazz_tag_id) references code.clazz_tags (id);
alter table edu.clazzes_tags add constraint fk_7r9kr1vfdkut7yw4vloynk09h foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazzes_teachers add constraint fk_9t0p4g06kld01v7ejwgkme3uy foreign key (clazz_id) references edu.clazzes (id);
alter table edu.clazzes_teachers add constraint fk_bgnv4fqqdw72wkdtdv6qn0knf foreign key (teacher_id) references base.teachers (id);
alter table edu.course_grade_states add constraint fk_4v9dnr4xvy0wgp6hesucxm0d5 foreign key (grading_mode_id) references code.grading_modes (id);
alter table edu.course_grade_states add constraint fk_fp6qwhpeppjechny9bhtk0l2f foreign key (inputer_id) references base.users (id);
alter table edu.course_grade_states add constraint fk_ik4jw2fbx8l1bov4w5vhd1qkc foreign key (clazz_id) references edu.clazzes (id);
alter table edu.course_grades add constraint fk_2cuxqnlwtfph8n11lfxyx24c2 foreign key (project_id) references base.projects (id);
alter table edu.course_grades add constraint fk_4jisb80kutoj4il07aoxt6gfj foreign key (course_type_id) references code.course_types (id);
alter table edu.course_grades add constraint fk_609wisyl64aolpni3i7jjkpu2 foreign key (grading_mode_id) references code.grading_modes (id);
alter table edu.course_grades add constraint fk_bfriycu9ape05xou5hmrd47in foreign key (std_id) references base.students (id);
alter table edu.course_grades add constraint fk_bsq1vt0u09li5db217joowltu foreign key (clazz_id) references edu.clazzes (id);
alter table edu.course_grades add constraint fk_gwuis19phdhrfhsbirfrjg6c8 foreign key (course_id) references base.courses (id);
alter table edu.course_grades add constraint fk_hiltid295la5cxrm3o4dfdmsr foreign key (course_take_type_id) references code.course_take_types (id);
alter table edu.course_grades add constraint fk_iqjgumy62st0ab2rstwps1kv6 foreign key (semester_id) references base.semesters (id);
alter table edu.course_grades add constraint fk_nfy88swiyqnn7g2tqy8j9ikw9 foreign key (exam_mode_id) references code.exam_modes (id);
alter table edu.course_takers add constraint fk_1q96mau6g0y556cjdpb2snefc foreign key (std_id) references base.students (id);
alter table edu.course_takers add constraint fk_8od0g1q3ost5o6p18tyxpbubn foreign key (course_type_id) references code.course_types (id);
alter table edu.course_takers add constraint fk_cixduaqxt9wljpewc8b6vlm5y foreign key (course_id) references base.courses (id);
alter table edu.course_takers add constraint fk_ii8593nh0tmctkdi6uyirunhh foreign key (subclazz_id) references edu.subclazzes (id);
alter table edu.course_takers add constraint fk_iplpgafup80l8ddb9mplrvffg foreign key (take_type_id) references code.course_take_types (id);
alter table edu.course_takers add constraint fk_iudic6c7cos27mk7q4v7utvyx foreign key (election_mode_id) references code.election_modes (id);
alter table edu.course_takers add constraint fk_ldng7jhrt67uu3qp8o739bgvf foreign key (semester_id) references base.semesters (id);
alter table edu.course_takers add constraint fk_t2d5jklxy8juraw0vi71fk0kt foreign key (clazz_id) references edu.clazzes (id);
alter table edu.course_tasks add constraint fk_4p283ey16d4vucl25radomhf3 foreign key (course_type_id) references code.course_types (id);
alter table edu.course_tasks add constraint fk_8orryf4ykp81il5nm3mxxoavy foreign key (office_id) references base.teaching_offices (id);
alter table edu.course_tasks add constraint fk_9y4fahxcv53ackqgyye3ybh3r foreign key (semester_id) references base.semesters (id);
alter table edu.course_tasks add constraint fk_a2tal3bxk0lh94b1mh5tbeppx foreign key (course_id) references base.courses (id);
alter table edu.course_tasks add constraint fk_cqr6alvvovahiqrmik0w7yx7s foreign key (director_id) references base.teachers (id);
alter table edu.course_tasks add constraint fk_fk1kvrmumyid0nwwn1on41d6g foreign key (department_id) references base.departments (id);
alter table edu.course_tasks_teachers add constraint fk_75bsuco09y3nxgocla1fofyhu foreign key (course_task_id) references edu.course_tasks (id);
alter table edu.course_tasks_teachers add constraint fk_fxu2tec0p18orrgn6kf0rw5ap foreign key (teacher_id) references base.teachers (id);
alter table edu.exam_activities add constraint fk_1g5nrxtfwonuvcpxyrubg8qjc foreign key (clazz_id) references edu.clazzes (id);
alter table edu.exam_activities add constraint fk_7270v4uigt0gi7wn7r79winaq foreign key (exam_form_id) references code.exam_forms (id);
alter table edu.exam_activities add constraint fk_eatq3hqscl8dr05hnwfl2gmhx foreign key (exam_type_id) references code.exam_types (id);
alter table edu.exam_activities add constraint fk_fytxvsloavwf4og776fp3ruej foreign key (semester_id) references base.semesters (id);
alter table edu.exam_activities add constraint fk_o0v4xff3ok25cj0rnv8or9ydb foreign key (task_id) references edu.exam_tasks (id);
alter table edu.exam_activities add constraint fk_qwhecmo554d3l56i1sixi4msw foreign key (room_type_id) references code.classroom_types (id);
alter table edu.exam_activities_rooms add constraint fk_ojkijvpd8uagfildnx8wq2lyl foreign key (exam_room_id) references edu.exam_rooms (id);
alter table edu.exam_activities_rooms add constraint fk_tey71qyracjlslgokbnahdmki foreign key (exam_activity_id) references edu.exam_activities (id);
alter table edu.exam_analyses add constraint fk_d687atvkk0qjymkbstnv1pss9 foreign key (clazz_id) references edu.clazzes (id);
alter table edu.exam_grade_states add constraint fk_gguqm48tut90x9xfdj754dujj foreign key (grade_state_id) references edu.course_grade_states (id);
alter table edu.exam_grade_states add constraint fk_ivx09k5phb544j9cqrt4unadp foreign key (grade_type_id) references code.grade_types (id);
alter table edu.exam_grade_states add constraint fk_todj5tm0wtrvgwkr61bfemtq foreign key (grading_mode_id) references code.grading_modes (id);
alter table edu.exam_grades add constraint fk_75uo2lkvemgysq4p00y93rrb foreign key (grade_type_id) references code.grade_types (id);
alter table edu.exam_grades add constraint fk_djkymrddtob1fwroq7k2h2tvw foreign key (course_grade_id) references edu.course_grades (id);
alter table edu.exam_grades add constraint fk_nj5tj3yrsll20pxnshbgtkjfy foreign key (exam_status_id) references code.exam_statuses (id);
alter table edu.exam_grades add constraint fk_qrsr08p65vxbhhpfyk9wij7c3 foreign key (grading_mode_id) references code.grading_modes (id);
alter table edu.exam_groups add constraint fk_2qi232puueusje5sa83157c0u foreign key (project_id) references base.projects (id);
alter table edu.exam_groups add constraint fk_9paixyr8guphi7p37hpplqr8q foreign key (alloc_setting_id) references cfg.edu_exam_alloc_settings (id);
alter table edu.exam_groups add constraint fk_fisp6n4qhnde5fx4ohub8gmo foreign key (exam_type_id) references code.exam_types (id);
alter table edu.exam_groups add constraint fk_ntugt7yl8tmqd5xcl0pgdsxio foreign key (semester_id) references base.semesters (id);
alter table edu.exam_groups_rooms add constraint fk_9rsyjpg1xgoctrkohgltirt1l foreign key (exam_group_id) references edu.exam_groups (id);
alter table edu.exam_groups_rooms add constraint fk_ga2h02wa0x23nes2dtx4fqjdl foreign key (classroom_id) references base.classrooms (id);
alter table edu.exam_notices add constraint fk_3qmwkrl8wxwoap6bovcpmwajg foreign key (project_id) references base.projects (id);
alter table edu.exam_notices add constraint fk_86ukl5uwe2bobcqx2n42tyq4j foreign key (exam_type_id) references code.exam_types (id);
alter table edu.exam_notices add constraint fk_qs7pki4ehd4cgrjkbhgt3aq9a foreign key (semester_id) references base.semesters (id);
alter table edu.exam_room_groups add constraint fk_awhe2r78c89hre41ti1nbgnux foreign key (project_id) references base.projects (id);
alter table edu.exam_room_groups_rooms add constraint fk_6u9pxpnfrkh6bwfiu8vs2nb10 foreign key (classroom_id) references base.classrooms (id);
alter table edu.exam_room_groups_rooms add constraint fk_co90ax8bfbc4rssrkoegj0pxo foreign key (exam_room_group_id) references edu.exam_room_groups (id);
alter table edu.exam_rooms add constraint fk_54y1gbt4xax4ap729xv2huh98 foreign key (semester_id) references base.semesters (id);
alter table edu.exam_rooms add constraint fk_jkilj4ukflpc1huspgcadjn5p foreign key (room_id) references base.classrooms (id);
alter table edu.exam_rooms add constraint fk_k0b5xitbjfno3rasqmotqy5kp foreign key (teach_depart_id) references base.departments (id);
alter table edu.exam_rooms add constraint fk_ywh4754qvjafehgg6asqkfq9 foreign key (exam_type_id) references code.exam_types (id);
alter table edu.exam_takers add constraint fk_1g1bi7bklfym2k8si05fv5ig3 foreign key (std_id) references base.students (id);
alter table edu.exam_takers add constraint fk_5iw20rm80wujt5djcy91n510m foreign key (exam_room_id) references edu.exam_rooms (id);
alter table edu.exam_takers add constraint fk_75cwd2f5lk1epub8w3knltcl3 foreign key (exam_status_id) references code.exam_statuses (id);
alter table edu.exam_takers add constraint fk_d5ko6ykl5jhkrxi3861ss273o foreign key (activity_id) references edu.exam_activities (id);
alter table edu.exam_takers add constraint fk_fhd8wul4bdwyb0nx1rntvuy6a foreign key (semester_id) references base.semesters (id);
alter table edu.exam_takers add constraint fk_j165t2qt6utdforaqt97l42d2 foreign key (clazz_id) references edu.clazzes (id);
alter table edu.exam_takers add constraint fk_pke3r9dglf2fh6vbnh8ttsv65 foreign key (exam_type_id) references code.exam_types (id);
alter table edu.exam_tasks add constraint fk_19y90ca4u4rvuijewvfebxare foreign key (semester_id) references base.semesters (id);
alter table edu.exam_tasks add constraint fk_38x7rfcid9ebam68m802efyv6 foreign key (room_group_id) references edu.exam_room_groups (id);
alter table edu.exam_tasks add constraint fk_49a33f9a9dgfi64wen46mkaet foreign key (exam_type_id) references code.exam_types (id);
alter table edu.exam_tasks add constraint fk_6nqnua9kbo2oussu1u6wqh4ai foreign key (room_type_id) references code.classroom_types (id);
alter table edu.exam_tasks add constraint fk_7kpdmkpkj4rmpnd3axureujj3 foreign key (teach_depart_id) references base.departments (id);
alter table edu.exam_tasks add constraint fk_au2nsgk9y8sx7kfbk6vhq2bny foreign key (building_id) references base.buildings (id);
alter table edu.exam_tasks add constraint fk_hp4i91pvmch4bdvnbykhd90ow foreign key (project_id) references base.projects (id);
alter table edu.exam_tasks add constraint fk_ir80a5a9j5ub493ty79i2cgly foreign key (group_id) references edu.exam_groups (id);
alter table edu.exam_tasks_rooms add constraint fk_k54r6lde174v9rim8522aqh69 foreign key (exam_task_id) references edu.exam_tasks (id);
alter table edu.exam_tasks_rooms add constraint fk_r2jgn9sn02w3m7fpy78yp34nm foreign key (classroom_id) references base.classrooms (id);
alter table edu.exam_turns add constraint fk_e116e2kmswvdcoe5p97vk1psd foreign key (group_id) references edu.exam_groups (id);
alter table edu.executive_course_groups add constraint fk_56dhnv2u0mj39lg7utkuwegmg foreign key (parent_id) references edu.executive_course_groups (id);
alter table edu.executive_course_groups add constraint fk_6mh987hal1axohw2uqqpb6n6b foreign key (stage_id) references base.calendar_stages (id);
alter table edu.executive_course_groups add constraint fk_8sryyotbjk7ax803pbug4iu71 foreign key (plan_id) references edu.executive_plans (id);
alter table edu.executive_course_groups add constraint fk_a0ab8elp15ghrbghqqxu0x0rn foreign key (course_type_id) references code.course_types (id);
alter table edu.executive_course_groups add constraint fk_e3u16a7tqmsg4lxcxhmltrnav foreign key (direction_id) references base.major_directions (id);
alter table edu.executive_course_groups add constraint fk_qws3d63si4v6xhjnqrkjq7dq7 foreign key (rank_id) references code.course_ranks (id);
alter table edu.executive_plan_courses add constraint fk_18f6shjjvisy7v08ajv64f86d foreign key (stage_id) references base.calendar_stages (id);
alter table edu.executive_plan_courses add constraint fk_3irsjah8bv57ll08ke16ip3nt foreign key (course_id) references base.courses (id);
alter table edu.executive_plan_courses add constraint fk_bxpc5hpop09uieul3wd6s1gor foreign key (group_id) references edu.executive_course_groups (id);
alter table edu.executive_plans add constraint fk_et79eqg7pxspppjsn2v1lubwf foreign key (program_id) references edu.programs (id);
alter table edu.executive_plans add constraint fk_nohn7ans85unejkqslgf0ohw6 foreign key (department_id) references base.departments (id);
alter table edu.exempt_courses add constraint fk_a64xrpejbkfdsvkdvd5dka417 foreign key (edu_type_id) references code.education_types (id);
alter table edu.exempt_courses add constraint fk_bql94vuidfu85kogc9yrfguun foreign key (level_id) references code.education_levels (id);
alter table edu.exempt_courses add constraint fk_d7fvrryka01uynlw8avia3ocg foreign key (course_type_id) references code.course_types (id);
alter table edu.exempt_courses add constraint fk_g9kvqt662q5kfb855y4y76vhe foreign key (course_id) references base.courses (id);
alter table edu.exempt_courses add constraint fk_jtup9ahs2joikxtx7xntip688 foreign key (to_grade_id) references base.grades (id);
alter table edu.exempt_courses add constraint fk_k94s89qpam1w28547nk34tk89 foreign key (project_id) references base.projects (id);
alter table edu.exempt_courses add constraint fk_pporjdy8b6g0rhmxhracaet83 foreign key (from_grade_id) references base.grades (id);
alter table edu.exempt_courses_std_types add constraint fk_22i30q7mn3bheej5gymu64gn2 foreign key (exempt_course_id) references edu.exempt_courses (id);
alter table edu.exempt_courses_std_types add constraint fk_kk0ne3n6l1n3gc52qvir8yhbt foreign key (std_type_id) references code.std_types (id);
alter table edu.extern_exempt_credits add constraint fk_4fyaovfd9a0etlatj0l3lkvn6 foreign key (std_id) references base.students (id);
alter table edu.extern_grades add constraint fk_9cgka8cip9d1rh15y38wrvqef foreign key (extern_student_id) references base.extern_students (id);
alter table edu.extern_grades_exempts add constraint fk_jf0g50mjtskj5rlcdkqi4shcb foreign key (extern_grade_id) references edu.extern_grades (id);
alter table edu.extern_grades_exempts add constraint fk_jmo91tt5uy06lnd9f2hn72lwv foreign key (course_id) references base.courses (id);
alter table edu.final_makeup_courses add constraint fk_1kaf7x8a2b895kglop1rq4ejm foreign key (teacher_id) references base.teachers (id);
alter table edu.final_makeup_courses add constraint fk_b225pc6crcc6sb6bchixughx1 foreign key (project_id) references base.projects (id);
alter table edu.final_makeup_courses add constraint fk_byj7q6ie79bf0go5mphoct89p foreign key (depart_id) references base.departments (id);
alter table edu.final_makeup_courses add constraint fk_gsa1y1hg358b3lgn2ur70jcac foreign key (course_id) references base.courses (id);
alter table edu.final_makeup_courses add constraint fk_s7adqt3s08v8g58nkqbdad7m8 foreign key (semester_id) references base.semesters (id);
alter table edu.final_makeup_courses_squads add constraint fk_bqn0v2ovb74kaoiri9exhb1cw foreign key (final_makeup_course_id) references edu.final_makeup_courses (id);
alter table edu.final_makeup_courses_squads add constraint fk_i84kxtw6ygeqmimbodv7m9onm foreign key (squad_id) references base.squads (id);
alter table edu.final_makeup_takers add constraint fk_5e4n642vhctedomk6hhpsxf5i foreign key (std_id) references base.students (id);
alter table edu.final_makeup_takers add constraint fk_9ef6gqa1pjpp47tfiheocwak0 foreign key (makeup_course_id) references edu.final_makeup_courses (id);
alter table edu.final_makeup_takers add constraint fk_ik2scl92fgay4ncc539w5064w foreign key (course_type_id) references code.course_types (id);
alter table edu.ga_grade_states add constraint fk_4akjhgw8yqn0iep1r9y5a6vpr foreign key (grading_mode_id) references code.grading_modes (id);
alter table edu.ga_grade_states add constraint fk_hvkysjl2gagay3w0nhcu8fqre foreign key (grade_state_id) references edu.course_grade_states (id);
alter table edu.ga_grade_states add constraint fk_ti39wcgmvipx0m7ktnl1wfu9r foreign key (grade_type_id) references code.grade_types (id);
alter table edu.ga_grades add constraint fk_3g037yqfqpd6oyls5yxq8qp12 foreign key (course_grade_id) references edu.course_grades (id);
alter table edu.ga_grades add constraint fk_7xcadogkvbjx0oybg38t0h9yq foreign key (grading_mode_id) references code.grading_modes (id);
alter table edu.ga_grades add constraint fk_lmxytm11q7oy8bs1fgxn5redb foreign key (grade_type_id) references code.grade_types (id);
alter table edu.invigilation_clazz_quotas add constraint fk_6dh0gleyl0chuqcscjhd0uew5 foreign key (clazz_id) references edu.clazzes (id);
alter table edu.invigilation_clazz_quotas add constraint fk_oa8nv64nvxsf9otgawe9cdx28 foreign key (teacher_id) references base.teachers (id);
alter table edu.invigilation_quota_details add constraint fk_9xwi7lrfc9bm11a0x66s2b2ht foreign key (depart_id) references base.departments (id);
alter table edu.invigilation_quota_details add constraint fk_d33fqik9lfr73gui9x8vsi57n foreign key (quota_id) references edu.invigilation_quotas (id);
alter table edu.invigilation_quota_details add constraint fk_qnnspqsq0noogvwyl9n5pf806 foreign key (campus_id) references base.campuses (id);
alter table edu.invigilation_quotas add constraint fk_6iqgn4bkafnohp6xoghromgdg foreign key (semester_id) references base.semesters (id);
alter table edu.invigilation_quotas add constraint fk_8jlqx1lv94bkiadaqfy5if2dw foreign key (invigilator_id) references base.users (id);
alter table edu.invigilation_quotas add constraint fk_m136m17tvffb100pas7uoxdr1 foreign key (project_id) references base.projects (id);
alter table edu.invigilation_quotas_excludes add constraint fk_t9egfdso6aja69am0rtqa8dcq foreign key (invigilation_quota_id) references edu.invigilation_quotas (id);
alter table edu.invigilations add constraint fk_au2iu9e3iy0om0d34yr8fr8hx foreign key (invigilator_id) references base.users (id);
alter table edu.invigilations add constraint fk_l9climivnb8gtmg3uieyvmfmy foreign key (exam_room_id) references edu.exam_rooms (id);
alter table edu.invigilations add constraint fk_ndi29qntmgteryntye0jye3cc foreign key (department_id) references base.departments (id);
alter table edu.lesson_design_sections add constraint fk_sekm4iwyl9v2swbnvvfhfhmny foreign key (design_id) references edu.lesson_designs (id);
alter table edu.lesson_design_texts add constraint fk_rl5n4rr7r7arp6byxx46hekea foreign key (design_id) references edu.lesson_designs (id);
alter table edu.lesson_designs add constraint fk_28csuwjgk7l8p9cex45revrws foreign key (program_id) references edu.clazz_programs (id);
alter table edu.lessons add constraint fk_3eo52tjd9r5ymkix3s83t2dwy foreign key (plan_id) references edu.clazz_plans (id);
alter table edu.lessons add constraint fk_g2wovhpgbf5lnlppmoo6cr0p1 foreign key (subclazz_id) references edu.subclazzes (id);
alter table edu.major_alt_courses add constraint fk_38vktyypc4qx0hqcwkb7d6ibr foreign key (major_id) references base.majors (id);
alter table edu.major_alt_courses add constraint fk_hsr4tkheko9jr7u1um9lmnm0y foreign key (from_grade_id) references base.grades (id);
alter table edu.major_alt_courses add constraint fk_kw8nn4ka6l7bjwhe0585d13ri foreign key (department_id) references base.departments (id);
alter table edu.major_alt_courses add constraint fk_nm6mgwq1qvgh4aslmjnv25nsn foreign key (direction_id) references base.major_directions (id);
alter table edu.major_alt_courses add constraint fk_qy740u3nwenq9kdultydn0bmk foreign key (to_grade_id) references base.grades (id);
alter table edu.major_alt_courses add constraint fk_tje28di1a4lc9p4dc77uomij3 foreign key (project_id) references base.projects (id);
alter table edu.major_alt_courses add constraint fk_uj8i0ugwdd0rgy9cdyasb916 foreign key (std_type_id) references code.std_types (id);
alter table edu.major_alt_courses_news add constraint fk_lddjfdvlcwthx2y8gis5rbp5i foreign key (course_id) references base.courses (id);
alter table edu.major_alt_courses_news add constraint fk_q74bnkaxqtuleop0lyw1w1xeg foreign key (major_alt_course_id) references edu.major_alt_courses (id);
alter table edu.major_alt_courses_olds add constraint fk_f488kjk8bfxelb3ob2m081k5r foreign key (major_alt_course_id) references edu.major_alt_courses (id);
alter table edu.major_alt_courses_olds add constraint fk_q89c5jynwnebdsl47nk45nkfx foreign key (course_id) references base.courses (id);
alter table edu.major_course_groups add constraint fk_436wsxxoka11ym0dysdeeg4ip foreign key (stage_id) references base.calendar_stages (id);
alter table edu.major_course_groups add constraint fk_9g2r0wmg6d6q20b2tuxs4iupb foreign key (plan_id) references edu.major_plans (id);
alter table edu.major_course_groups add constraint fk_a35kim5625k61npq75jsskqcy foreign key (direction_id) references base.major_directions (id);
alter table edu.major_course_groups add constraint fk_er4c5awycvn4b3so4q9mfx52k foreign key (rank_id) references code.course_ranks (id);
alter table edu.major_course_groups add constraint fk_meex9q80ousce5vb0n9ph64p8 foreign key (course_type_id) references code.course_types (id);
alter table edu.major_course_groups add constraint fk_pc8q580jvu7xjgou4je6pbo5o foreign key (parent_id) references edu.major_course_groups (id);
alter table edu.major_plan_courses add constraint fk_5y31fkbotohec2w77hlqvb3an foreign key (course_id) references base.courses (id);
alter table edu.major_plan_courses add constraint fk_cpur8aumdrrxdxdcxosq9i8e9 foreign key (stage_id) references base.calendar_stages (id);
alter table edu.major_plan_courses add constraint fk_fy23vsj0y540goto20im2k2b7 foreign key (group_id) references edu.major_course_groups (id);
alter table edu.major_plans add constraint fk_n3g1jvkcrf58m586jfv9adglm foreign key (program_id) references edu.programs (id);
alter table edu.mini_clazz_activities add constraint fk_gv07ppihhg0ta78r09nfy8x1g foreign key (coach1_id) references base.users (id);
alter table edu.mini_clazz_activities add constraint fk_lyrbqkvrq062g0qkwffp8tnrv foreign key (mini_clazz_id) references edu.mini_clazzes (id);
alter table edu.mini_clazz_activities add constraint fk_o62drwgl6u05laqk6p851t94h foreign key (coach2_id) references base.users (id);
alter table edu.mini_clazz_activities add constraint fk_qgqcs7mn2kbspko6hinps92ts foreign key (teacher_id) references base.teachers (id);
alter table edu.mini_clazzes add constraint fk_9gat5afvu6t3oi9owwebbvmoe foreign key (semester_id) references base.semesters (id);
alter table edu.mini_clazzes add constraint fk_fmhlll73mqj7xkjrk87vd263t foreign key (project_id) references base.projects (id);
alter table edu.mini_clazzes add constraint fk_g54qg0i9hm1nbmg2m6a7n839i foreign key (teacher_id) references base.teachers (id);
alter table edu.mini_clazzes add constraint fk_hnrgbw7etthlww63oc1ryxuhn foreign key (course_id) references base.courses (id);
alter table edu.mini_clazzes add constraint fk_sh3lhhuphg0obentx2h5ywqup foreign key (teach_depart_id) references base.departments (id);
alter table edu.mini_clazzes_stds add constraint fk_daujuml3i7o557awedjldp7wv foreign key (mini_clazz_id) references edu.mini_clazzes (id);
alter table edu.mini_clazzes_stds add constraint fk_j7dorxuc3wd616p5c69d12lsq foreign key (student_id) references base.students (id);
alter table edu.moral_grades add constraint fk_ajmpi0vpnwedkblj97agkampw foreign key (std_id) references base.students (id);
alter table edu.moral_grades add constraint fk_d5ao36odp5nxtmtlcvklnb0ug foreign key (semester_id) references base.semesters (id);
alter table edu.moral_grades add constraint fk_rstufccmh1773bqit1b9v8cat foreign key (grading_mode_id) references code.grading_modes (id);
alter table edu.occupancies add constraint fk_cxcnxdgl2tss3ved9eqe00oq9 foreign key (room_id) references base.classrooms (id);
alter table edu.occupancies add constraint fk_k0q49iwr2wn7rxtwo844r7rai foreign key (app_id) references edu.room_occupy_apps (id);
alter table edu.occupancies add constraint fk_s1fwddmde81ci845s5lwu69vx foreign key (activity_type_id) references code.activity_types (id);
alter table edu.program_course_labels add constraint fk_1g3koth47oni9h0coergbns76 foreign key (tag_id) references code.program_course_tags (id);
alter table edu.program_course_labels add constraint fk_8enehe9sa6p3va1drnjtia6ke foreign key (program_id) references edu.programs (id);
alter table edu.program_course_labels add constraint fk_lh6g9pye62c4655juhxng74yu foreign key (course_id) references base.courses (id);
alter table edu.program_course_outcomes add constraint fk_30oo9u3w8oosxj1u361qvmgou foreign key (course_id) references base.courses (id);
alter table edu.program_course_outcomes add constraint fk_ktrxakwxdaibvxdkyjatb2u8l foreign key (doc_id) references edu.program_docs (id);
alter table edu.program_doc_metas add constraint fk_m1vrqjy2yfp0tncdk6y0wdi5m foreign key (template_id) references edu.program_doc_templates (id);
alter table edu.program_doc_sections add constraint fk_46gbs7xngpyw938o4916n9soy foreign key (doc_id) references edu.program_docs (id);
alter table edu.program_doc_sections add constraint fk_gg4dh1idchc0dpmdlftk6wd8t foreign key (parent_id) references edu.program_doc_sections (id);
alter table edu.program_doc_templates add constraint fk_5wxc0yo3x6kcerxnk551fr30s foreign key (edu_type_id) references code.education_types (id);
alter table edu.program_doc_templates add constraint fk_csskn138f8du114lhkfp4f25b foreign key (level_id) references code.education_levels (id);
alter table edu.program_doc_templates add constraint fk_l0gmpbto7t72cuf2shuvc7ylr foreign key (project_id) references base.projects (id);
alter table edu.program_doc_templates add constraint fk_lv9weyvu8hiw1fxgpsydo80h9 foreign key (department_id) references base.departments (id);
alter table edu.program_doc_templates_types add constraint fk_fuww87g53wh0qmo8fdws3xuh foreign key (std_type_id) references code.std_types (id);
alter table edu.program_doc_templates_types add constraint fk_jedlxpuxehpy3ji0yfhm2a0q7 foreign key (program_doc_template_id) references edu.program_doc_templates (id);
alter table edu.program_docs add constraint fk_6nuhhsgx6jifdflymn6t9j3o4 foreign key (program_id) references edu.programs (id);
alter table edu.program_objectives add constraint fk_6i92kd04faqrep3d09n2hrel2 foreign key (doc_id) references edu.program_docs (id);
alter table edu.program_outcomes add constraint fk_q4jxukvs7tkhwxmxe0c1o14ph foreign key (doc_id) references edu.program_docs (id);
alter table edu.program_prerequisites add constraint fk_6v54f49o1j1uyx3scjcrlnlco foreign key (program_id) references edu.programs (id);
alter table edu.program_prerequisites add constraint fk_8c8deivak1he7o0ptisx0rlog foreign key (prerequisite_id) references base.courses (id);
alter table edu.program_prerequisites add constraint fk_no54i5e4i3fkbed635lpif5s3 foreign key (course_id) references base.courses (id);
alter table edu.program_tables add constraint fk_pie7l0pqb0xptybh3j5c2kb47 foreign key (doc_id) references edu.program_docs (id);
alter table edu.program_texts add constraint fk_9m9aw8lcs9ve08cs1wbvb48yv foreign key (doc_id) references edu.program_docs (id);
alter table edu.programs add constraint fk_4rn8q2eyyntseukhs0l5tl6rq foreign key (project_id) references base.projects (id);
alter table edu.programs add constraint fk_7xrusj91mbbujeaxtrrdowj7e foreign key (department_id) references base.departments (id);
alter table edu.programs add constraint fk_fhc4pkknpiudfgelp4ma376th foreign key (offset_type_id) references code.course_types (id);
alter table edu.programs add constraint fk_fpvvja6nue3bxvc5rxxcxjlwb foreign key (major_id) references base.majors (id);
alter table edu.programs add constraint fk_g50vaxdjois92fmuc6ir14nub foreign key (direction_id) references base.major_directions (id);
alter table edu.programs add constraint fk_m0amu5fwiyr2y3m11jdfgarir foreign key (study_type_id) references code.study_types (id);
alter table edu.programs add constraint fk_ne9yofos5qm2hyxt3j6u86pra foreign key (level_id) references code.education_levels (id);
alter table edu.programs add constraint fk_repdcuryw948uhentmshwj8c0 foreign key (grade_id) references base.grades (id);
alter table edu.programs add constraint fk_t35rhrg49tfvpn499spndm9m0 foreign key (edu_type_id) references code.education_types (id);
alter table edu.programs add constraint fk_tbmrgc18tswwmth3afhou96ws foreign key (degree_id) references code.degrees (id);
alter table edu.programs_degree_certificates add constraint fk_1gc5anx99vudxymxim82gbhi7 foreign key (program_id) references edu.programs (id);
alter table edu.programs_degree_certificates add constraint fk_iy79rmju1wtn8f65hhateuqlv foreign key (certificate_id) references code.certificates (id);
alter table edu.programs_degree_courses add constraint fk_868yayysj30xwtd1rywo705b9 foreign key (course_id) references base.courses (id);
alter table edu.programs_degree_courses add constraint fk_sut51axvsnyf8sqrqt894pu07 foreign key (program_id) references edu.programs (id);
alter table edu.programs_std_types add constraint fk_79kom1hj1l5m30fmg3y85seyy foreign key (program_id) references edu.programs (id);
alter table edu.programs_std_types add constraint fk_8xvgc6vx56yspcomgcyyf5h2f foreign key (std_type_id) references code.std_types (id);
alter table edu.regular_grade_states add constraint fk_j5ace0mxflctid23oeqqhaq8q foreign key (clazz_id) references edu.clazzes (id);
alter table edu.regular_grades add constraint fk_2oruj40kqq3brkq6rpiswt02n foreign key (std_id) references base.students (id);
alter table edu.regular_grades add constraint fk_kahcmptsyckx2c6rsh0c88e8q foreign key (clazz_id) references edu.clazzes (id);
alter table edu.room_applies add constraint fk_1hy8arqevamhm0p61tmxtpepd foreign key (audit_depart_id) references base.departments (id);
alter table edu.room_applies add constraint fk_20id4cb1d1x6200p623rlmfvk foreign key (apply_by_id) references base.users (id);
alter table edu.room_applies add constraint fk_3aeoyormiqlanhahh275e24af foreign key (campus_id) references base.campuses (id);
alter table edu.room_applies add constraint fk_5c4e72iuk8knlqt9b2bnp49ur foreign key (activity_type_id) references code.activity_types (id);
alter table edu.room_applies add constraint fk_bder5hiniytppyemmjpxbe26n foreign key (school_id) references base.schools (id);
alter table edu.room_applies add constraint fk_k2ogosa10sqx0h4rqgkvcwt4h foreign key (applicant_id) references base.users (id);
alter table edu.room_applies_rooms add constraint fk_6ocigqxbksqi0cyosbbo2h91s foreign key (classroom_id) references base.classrooms (id);
alter table edu.room_applies_rooms add constraint fk_nu4r5htixx20aou9bo8ep23bb foreign key (room_apply_id) references edu.room_applies (id);
alter table edu.room_applies_times add constraint fk_qpapnbbq74r8lwfljrwobal9j foreign key (room_apply_id) references edu.room_applies (id);
alter table edu.room_available_times add constraint fk_183gwhpwsatxi28cono6qufx0 foreign key (room_id) references base.classrooms (id);
alter table edu.room_available_times add constraint fk_80f0a3loerpivqs3t1eq13h20 foreign key (project_id) references base.projects (id);
alter table edu.schedule_suggest_activities add constraint fk_8q8nyh7gowhg1abqf3ynl4b7v foreign key (room_id) references base.classrooms (id);
alter table edu.schedule_suggest_activities add constraint fk_j8o7qh8x8fbj6a22o2y071m6j foreign key (suggest_id) references edu.schedule_suggests (id);
alter table edu.schedule_suggest_activities add constraint fk_mxyxuxwadb62lh05bh2pefu06 foreign key (teacher_id) references base.teachers (id);
alter table edu.schedule_suggests add constraint fk_7vlv1npy2apos04g4bhopmbky foreign key (clazz_id) references edu.clazzes (id);
alter table edu.share_course_groups add constraint fk_29itujl04g1d0tewu4euvwxch foreign key (parent_id) references edu.share_course_groups (id);
alter table edu.share_course_groups add constraint fk_doly7nd7pa0vvd6ujij91csk0 foreign key (language_id) references code.languages (id);
alter table edu.share_course_groups add constraint fk_fnm7tvjc6yxwbt3akuumkylv1 foreign key (plan_id) references edu.share_plans (id);
alter table edu.share_course_groups add constraint fk_sugmy66goqyn0fg09os9n6x3g foreign key (course_type_id) references code.course_types (id);
alter table edu.share_course_groups add constraint fk_te39uk0s4fei49vb4338fwo1b foreign key (course_ability_rate_id) references code.course_ability_rates (id);
alter table edu.share_plan_courses add constraint fk_4x1x85crd70rtcn7jprkwcvqg foreign key (group_id) references edu.share_course_groups (id);
alter table edu.share_plan_courses add constraint fk_gk31f102f07n600dmxtk3r5wd foreign key (course_id) references base.courses (id);
alter table edu.share_plans add constraint fk_2k0vsvhhpgmrnr17nd2cn3k6u foreign key (from_grade_id) references base.grades (id);
alter table edu.share_plans add constraint fk_cny7nppj5dxgnv6f658ojhmyq foreign key (level_id) references code.education_levels (id);
alter table edu.share_plans add constraint fk_d5i7m1erpwryd36x2mtf05qym foreign key (edu_type_id) references code.education_types (id);
alter table edu.share_plans add constraint fk_gigxbxd3mnkv802g9p4dit81h foreign key (project_id) references base.projects (id);
alter table edu.share_plans add constraint fk_gj0ph5idb2riwbygtit2r1aa0 foreign key (to_grade_id) references base.grades (id);
alter table edu.std_alt_courses add constraint fk_m4r4kwlknspq07nx10kptjp99 foreign key (std_id) references base.students (id);
alter table edu.std_alt_courses_news add constraint fk_6s622s9lgh94dxm8rdts3uacy foreign key (course_id) references base.courses (id);
alter table edu.std_alt_courses_news add constraint fk_kf2ddu7dt808aivpblhcrxrmy foreign key (std_alt_course_id) references edu.std_alt_courses (id);
alter table edu.std_alt_courses_olds add constraint fk_17lwdqgird951v1427i4bgj36 foreign key (course_id) references base.courses (id);
alter table edu.std_alt_courses_olds add constraint fk_n7rxknr6pcsfqb2yxr1krt01h foreign key (std_alt_course_id) references edu.std_alt_courses (id);
alter table edu.std_book_orders add constraint fk_2s5pren619nwcchjaxknvskwc foreign key (semester_id) references base.semesters (id);
alter table edu.std_book_orders add constraint fk_57o6l6s01q1hrfb2yv4t28dh4 foreign key (teach_depart_id) references base.departments (id);
alter table edu.std_book_orders add constraint fk_bhbb2e6fow3pnqt2b76fxwpe7 foreign key (project_id) references base.projects (id);
alter table edu.std_book_orders add constraint fk_cqegepom0hc8khnlmcm8dyro1 foreign key (std_id) references base.students (id);
alter table edu.std_book_orders add constraint fk_iwl0r22090n9224d2e2kpa2cq foreign key (textbook_id) references base.textbooks (id);
alter table edu.std_book_orders add constraint fk_oeiqfm4uo6j0ouwcljwavu97s foreign key (course_id) references base.courses (id);
alter table edu.std_course_abilities add constraint fk_7q7mrns33elrcpminu6waryj7 foreign key (std_id) references base.students (id);
alter table edu.std_course_abilities add constraint fk_c7ddhnmuoymrsl7rj8dce3nmg foreign key (rate_id) references code.course_ability_rates (id);
alter table edu.std_credit_stats add constraint fk_4ha5yos34k4v7gy21pjjfxns1 foreign key (semester_id) references base.semesters (id);
alter table edu.std_credit_stats add constraint fk_5v34kkq90rx1oik1hsu700fw3 foreign key (std_id) references base.students (id);
alter table edu.std_exempt_courses add constraint fk_27vh917pm1c0srhuy8dp7mdf foreign key (course_id) references base.courses (id);
alter table edu.std_exempt_courses add constraint fk_hddf5i451f8khi1hl5k0m1suo foreign key (std_id) references base.students (id);
alter table edu.std_gpas add constraint fk_bh0csdi3p4htsjgkvpi7yrikg foreign key (project_id) references base.projects (id);
alter table edu.std_gpas add constraint fk_h1o63hxeorv31hy6x0palswoc foreign key (std_id) references base.students (id);
alter table edu.std_leave_files add constraint fk_6iw9dbpma99lp6p2sjn6wtocv foreign key (leave_id) references edu.std_leaves (id);
alter table edu.std_leave_lessons add constraint fk_gmr2yv6ln2f6i91cjxg4dxgl6 foreign key (clazz_id) references edu.clazzes (id);
alter table edu.std_leave_lessons add constraint fk_gqf4ubf1rjpyyxcxupc78sn95 foreign key (std_id) references base.students (id);
alter table edu.std_leave_lessons add constraint fk_mybnsq8acelrwwuun0qq65076 foreign key (leave_id) references edu.std_leaves (id);
alter table edu.std_leave_lessons add constraint fk_n2j9b2iax6x0eopde0o3y4epk foreign key (semester_id) references base.semesters (id);
alter table edu.std_leaves add constraint fk_qbx8ymrwnx6byc3ktiqrmk0kt foreign key (semester_id) references base.semesters (id);
alter table edu.std_leaves add constraint fk_s0ohl6kmnyy5ut715hnvy1qbj foreign key (std_id) references base.students (id);
alter table edu.std_program_bindings add constraint fk_20a1u2fkkwntttaj61a2d3gt2 foreign key (std_id) references base.students (id);
alter table edu.std_program_bindings add constraint fk_n1e76uwd9xe1cw1hb93lx3ibc foreign key (program_id) references edu.programs (id);
alter table edu.std_semester_gpas add constraint fk_cynt5rw0kfs7k2qhbueimmmdh foreign key (semester_id) references base.semesters (id);
alter table edu.std_semester_gpas add constraint fk_f5nwec2h1fyvp79drnby86m49 foreign key (std_gpa_id) references edu.std_gpas (id);
alter table edu.std_year_gpas add constraint fk_bm2wi8b0hv94snwm51u9g80tx foreign key (std_gpa_id) references edu.std_gpas (id);
alter table edu.subclazzes add constraint fk_3tm1bdhpjqhmki0l2vefj0fwu foreign key (clazz_id) references edu.clazzes (id);
alter table edu.syllabus_assessments add constraint fk_dd708jo3hstv02y0yjoqks5kn foreign key (grade_type_id) references code.grade_types (id);
alter table edu.syllabus_assessments add constraint fk_tab0q7d2thh08kqp1khu7bmut foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabus_cases add constraint fk_51u1eb2sag583rgdaa8w0xa30 foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabus_docs add constraint fk_385kte3hircwy5hxqxe5ext57 foreign key (semester_id) references base.semesters (id);
alter table edu.syllabus_docs add constraint fk_6hgp03420v9h2gbjcf4yj1qln foreign key (course_id) references base.courses (id);
alter table edu.syllabus_docs add constraint fk_cbgp40yeb3rkj27f6wt85fxic foreign key (writer_id) references base.users (id);
alter table edu.syllabus_docs add constraint fk_l06x7ny20kxmon2au60rnkdj4 foreign key (department_id) references base.departments (id);
alter table edu.syllabus_docs add constraint fk_sbo56dh80yng4sy9rxvy2sf63 foreign key (auditor_id) references base.users (id);
alter table edu.syllabus_experiments add constraint fk_8d9d58buigjgts7ix2fjdmaqe foreign key (experiment_id) references base.experiments (id);
alter table edu.syllabus_experiments add constraint fk_shhhmyva71kihwtqwgujnklum foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabus_hours add constraint fk_c7vgdyair7ro31ki2t0e4rf9c foreign key (nature_id) references code.teaching_natures (id);
alter table edu.syllabus_hours add constraint fk_hxhhi33m3cghohg19s59pt572 foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabus_method_designs add constraint fk_k5c1hajoxddphqgoiwl0fn0xr foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabus_objectives add constraint fk_c8kjvxhg2b05x3mdudh0w5bq6 foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabus_outcomes add constraint fk_d1pdut6i5ptsofpdhex0p43mh foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabus_texts add constraint fk_286n75frylon3uyt023yllh4y foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabus_texts add constraint fk_5nmjy66fqic9tuok37gsoikuc foreign key (parent_id) references edu.syllabus_texts (id);
alter table edu.syllabus_topic_elements add constraint fk_2jc1ji8majmgmn4x7x86rfork foreign key (topic_id) references edu.syllabus_topics (id);
alter table edu.syllabus_topic_elements add constraint fk_npm1934ocn6uk2jy70yam6wsg foreign key (label_id) references code.syllabus_topic_labels (id);
alter table edu.syllabus_topic_hours add constraint fk_8r4ui8xa3dcu5w1deaknx8603 foreign key (topic_id) references edu.syllabus_topics (id);
alter table edu.syllabus_topic_hours add constraint fk_sell6w4dvnuyx1w7861rrwtxo foreign key (nature_id) references code.teaching_natures (id);
alter table edu.syllabus_topics add constraint fk_6pnn88p4cs9ipf4dw95x6h60h foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabuses add constraint fk_2lrbxwrdxyj55yagxtdk27ue7 foreign key (semester_id) references base.semesters (id);
alter table edu.syllabuses add constraint fk_45658i3vc0d65nrux1y0gtng5 foreign key (grading_mode_id) references code.grading_modes (id);
alter table edu.syllabuses add constraint fk_6wvrai2233vbtbak7hjwt7ag0 foreign key (writer_id) references base.users (id);
alter table edu.syllabuses add constraint fk_bcjr4d78cmwxtof1akent1apw foreign key (department_id) references base.departments (id);
alter table edu.syllabuses add constraint fk_bmlcddtuf9x52khci12xx9c7c foreign key (exam_mode_id) references code.exam_modes (id);
alter table edu.syllabuses add constraint fk_ewy8s99rnsns2pxe0w8n228ex foreign key (module_id) references code.course_modules (id);
alter table edu.syllabuses add constraint fk_fg7i2h8r7lp0g07p9ervan4bk foreign key (approver_id) references base.users (id);
alter table edu.syllabuses add constraint fk_ftdg6klmi45h8gv9ox2sfklhg foreign key (rank_id) references code.course_ranks (id);
alter table edu.syllabuses add constraint fk_jlg5w66qkywoph4gthbbg6rsg foreign key (office_id) references base.teaching_offices (id);
alter table edu.syllabuses add constraint fk_l1lrt2t5wtuggruu5q99qr17x foreign key (course_id) references base.courses (id);
alter table edu.syllabuses add constraint fk_pitbbvb92nt6pk7rehm5upwqg foreign key (stage_id) references base.calendar_stages (id);
alter table edu.syllabuses add constraint fk_sh2nkojxdotmdpk1ju06htw7m foreign key (nature_id) references code.course_natures (id);
alter table edu.syllabuses add constraint fk_tp4vwoay61pfman7xor8hr27m foreign key (reviewer_id) references base.users (id);
alter table edu.syllabuses_levels add constraint fk_bt5e3t2ggduawe6keccg4vbuw foreign key (education_level_id) references code.education_levels (id);
alter table edu.syllabuses_levels add constraint fk_sumq6lrqf9elwn3b0t5qgg016 foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabuses_majors add constraint fk_9uur1t1wfnxrnfcmg8rgn5cp0 foreign key (major_id) references base.majors (id);
alter table edu.syllabuses_majors add constraint fk_rq8lq7gi1eg4ens8l1vku0vxt foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.syllabuses_textbooks add constraint fk_9r9tn4fpsb9md1qxhgup6ts7w foreign key (textbook_id) references base.textbooks (id);
alter table edu.syllabuses_textbooks add constraint fk_iuvjgrnbp37mpjg2ptmmb7m95 foreign key (syllabus_id) references edu.syllabuses (id);
alter table edu.teaching_loads add constraint fk_3957dj4fgo2f15wswkvgxaq6q foreign key (teacher_id) references base.teachers (id);
alter table edu.teaching_loads add constraint fk_ad45v21pyxd3b2ib37wvwo9u1 foreign key (course_id) references base.courses (id);
alter table edu.teaching_loads add constraint fk_dlplkf7xv9qsjbf9o64jbbi13 foreign key (semester_id) references base.semesters (id);
alter table edu.teaching_loads add constraint fk_io9no4a75usey7a0f1vkrtomo foreign key (teacher_title_id) references code.professional_titles (id);
alter table edu.teaching_loads add constraint fk_sovkmy71gktymlbsm1gmkm6u5 foreign key (capacity_factor_id) references cfg.edu_capacity_factors (id);
alter table edu.term_campuses add constraint fk_68n7gvvpufmuatbkigyjwotri foreign key (campus_id) references base.campuses (id);
alter table edu.term_campuses add constraint fk_6selxxfgj3ykw7q6othdmmv3o foreign key (program_id) references edu.programs (id);
alter table flow.edu_cert_exempt_applies add constraint fk_8xy7yv0myvo7k18jdvtcqg4ol foreign key (certificate_id) references code.certificates (id);
alter table flow.edu_cert_exempt_applies add constraint fk_9hqpp9ibhhhdb5kuo1js6gr8r foreign key (semester_id) references base.semesters (id);
alter table flow.edu_cert_exempt_applies add constraint fk_fkc4epwwurby8g9lrb082c7tl foreign key (std_id) references base.students (id);
alter table flow.edu_cert_exempt_applies add constraint fk_ksn7yeq51ttr4j2oxy0jj0tup foreign key (grading_mode_id) references code.grading_modes (id);
alter table flow.edu_cert_exempt_applies add constraint fk_r7u5wb71y2iydad2faabdped4 foreign key (audit_depart_id) references base.departments (id);
alter table flow.edu_cert_exempt_applies_courses add constraint fk_4ge8qhxcfstfjd48g2yda2lj3 foreign key (cert_exempt_apply_id) references flow.edu_cert_exempt_applies (id);
alter table flow.edu_cert_exempt_applies_courses add constraint fk_s1fsg2h352cv0aepex09145qw foreign key (course_id) references base.courses (id);
alter table flow.edu_course_alt_applies add constraint fk_bl2x473v3rmmp6qi0p4ojkkl3 foreign key (auditor_id) references base.users (id);
alter table flow.edu_course_alt_applies add constraint fk_eiwk118hrcx4pccn72echg2ra foreign key (std_id) references base.students (id);
alter table flow.edu_course_alt_applies_news add constraint fk_ia40an2405hdyw08esqqag4uv foreign key (course_alt_apply_id) references flow.edu_course_alt_applies (id);
alter table flow.edu_course_alt_applies_news add constraint fk_kicigtwmvym88vhpx4m0x3m3g foreign key (course_id) references base.courses (id);
alter table flow.edu_course_alt_applies_olds add constraint fk_2h33krs7kk67gqmjnbje4ay4h foreign key (course_id) references base.courses (id);
alter table flow.edu_course_alt_applies_olds add constraint fk_bdcd8ua12xinkksxnafmh1dyn foreign key (course_alt_apply_id) references flow.edu_course_alt_applies (id);
alter table flow.edu_course_type_change_applies add constraint fk_3uelnl8alpolvfqki2neeglx9 foreign key (new_type_id) references code.course_types (id);
alter table flow.edu_course_type_change_applies add constraint fk_8pfihfu083bf15lc75wflyijo foreign key (auditor_id) references base.users (id);
alter table flow.edu_course_type_change_applies add constraint fk_jq2wk2w96u5qe3g6xkatgf90f foreign key (course_id) references base.courses (id);
alter table flow.edu_course_type_change_applies add constraint fk_kl7o6l7t6gyxo1h31b6jah29j foreign key (old_type_id) references code.course_types (id);
alter table flow.edu_course_type_change_applies add constraint fk_qvuiiw3yjml2kas6c14g0iujg foreign key (std_id) references base.students (id);
alter table flow.edu_exam_defer_applies add constraint fk_7imce90cyh58qq7fv496a7jvm foreign key (std_id) references base.students (id);
alter table flow.edu_exam_defer_applies add constraint fk_b1lwbubvs1aumcbkbqtvlyqmq foreign key (reason_id) references code.exam_defer_reasons (id);
alter table flow.edu_exam_defer_applies add constraint fk_houye1qc5r43s8y663bjqa3k3 foreign key (clazz_id) references edu.clazzes (id);
alter table flow.edu_exam_defer_applies add constraint fk_n9cn6xnqkdf0vi1xrpoml8w4v foreign key (exam_type_id) references code.exam_types (id);
alter table flow.edu_extern_exempt_applies add constraint fk_cmax47872oxk8unugt9l8fx0p foreign key (extern_student_id) references base.extern_students (id);
alter table flow.edu_extern_exempt_applies add constraint fk_ffl3de69p916fkvwvrv3yxbsi foreign key (semester_id) references base.semesters (id);
alter table flow.edu_new_course_applies add constraint fk_16m7eofbd6bcstu4riw5ni7yv foreign key (exam_mode_id) references code.exam_modes (id);
alter table flow.edu_new_course_applies add constraint fk_21at3bdoub5eqiyc2eula4d05 foreign key (applicant_id) references base.users (id);
alter table flow.edu_new_course_applies add constraint fk_27hoy1o9c07bt4tn6i0e5995 foreign key (project_id) references base.projects (id);
alter table flow.edu_new_course_applies add constraint fk_387g9ljivru3jxdgxsocc0tcy foreign key (category_id) references flow.edu_new_course_categories (id);
alter table flow.edu_new_course_applies add constraint fk_eac9ye2h4tti5u6rrp4b3y2au foreign key (rank_id) references code.course_ranks (id);
alter table flow.edu_new_course_applies add constraint fk_eapmxr3lhv7973w7opidip8qk foreign key (department_id) references base.departments (id);
alter table flow.edu_new_course_applies add constraint fk_em5mh2clty1avltli9m0hfins foreign key (nature_id) references code.course_natures (id);
alter table flow.edu_new_course_applies add constraint fk_o8g0dsa3lxr5xf3q13dska24y foreign key (grading_mode_id) references code.grading_modes (id);
alter table flow.edu_new_course_applies add constraint fk_tj7ujf1r03hg4y6crjtw1dyir foreign key (module_id) references code.course_modules (id);
alter table flow.edu_new_course_applies_tags add constraint fk_e337xxmu3xn8dytgblifdwpjx foreign key (course_tag_id) references code.course_tags (id);
alter table flow.edu_new_course_applies_tags add constraint fk_eomhr7dsfvsxkl31jkr8xohxb foreign key (new_course_apply_id) references flow.edu_new_course_applies (id);
alter table flow.edu_new_course_apply_hours add constraint fk_l7wcmtqtes34hk7qe97j2fco6 foreign key (course_apply_id) references flow.edu_new_course_applies (id);
alter table flow.edu_new_course_apply_hours add constraint fk_tovmuehvajioljjit4b4673fa foreign key (nature_id) references code.teaching_natures (id);
alter table flow.edu_new_course_departs add constraint fk_60iccrk2txx4k767h41bfseao foreign key (school_id) references base.schools (id);
alter table flow.edu_new_course_departs add constraint fk_gls870o0jcts93hkbx7g4da8s foreign key (depart_id) references base.departments (id);
alter table flow.process_logs add constraint fk_ig1v0881ecbatm73ftrr83mbg foreign key (operator_id) references base.users (id);
alter table flow.process_logs add constraint fk_k72l3ohawu5uhm4i09xdnr320 foreign key (flow_type_id) references flow.flow_types (id);
alter table lab.lab_experiments add constraint fk_i0vuapwcokj3be9h2p3lli057 foreign key (task_id) references lab.lab_tasks (id);
alter table lab.lab_experiments add constraint fk_llngpoxmckvmntm8dp5jo2h9n foreign key (experiment_id) references base.experiments (id);
alter table lab.lab_tasks add constraint fk_800je7ssvdnpq03gdpmwrfis9 foreign key (nature_id) references code.course_natures (id);
alter table lab.lab_tasks add constraint fk_ap3i990156cnq9891r4nxked5 foreign key (department_id) references base.departments (id);
alter table lab.lab_tasks add constraint fk_fo8who9que0f2ihy9o155emae foreign key (semester_id) references base.semesters (id);
alter table lab.lab_tasks add constraint fk_nlctcagnfkpkgvms7e4y3j6vf foreign key (rank_id) references code.course_ranks (id);
alter table lab.lab_tasks add constraint fk_o2mk6oai9b2e3naujyiik6o2w foreign key (course_id) references base.courses (id);
alter table lab.lab_tasks add constraint fk_rtm2nghx8jx980pvos7l3qoic foreign key (director_id) references base.teachers (id);
alter table lab.lab_tasks add constraint fk_tmy9jpcngk5k3at5luqdvp8i2 foreign key (office_id) references base.teaching_offices (id);
alter table lab.lab_tasks_labs add constraint fk_7c3oy6rnq7vh9wkpt23yhh084 foreign key (laboratory_id) references base.laboratories (id);
alter table lab.lab_tasks_labs add constraint fk_ngp72ymfqmd11qfh2wmqk49k1 foreign key (lab_task_id) references lab.lab_tasks (id);
alter table log.edu_grade_changes add constraint fk_3thetdmwvjo7ocgbxj1w43fp5 foreign key (operator_id) references base.users (id);
alter table log.edu_grade_changes add constraint fk_ay1t1sv01m6kjjxxs68l0lsu1 foreign key (semester_id) references base.semesters (id);
alter table log.edu_grade_changes add constraint fk_bbf68h65kecxthfl3usdru1yr foreign key (project_id) references base.projects (id);
alter table log.edu_grade_changes add constraint fk_dhtwpadqf2mrrs4q669g69fdv foreign key (std_id) references base.students (id);
alter table log.edu_grade_changes add constraint fk_mhydxpk49ayt92b9qj04i0dlm foreign key (grade_type_id) references code.grade_types (id);
alter table log.edu_grade_changes add constraint fk_mq4k6fykdvubeknsumes38xaj foreign key (course_id) references base.courses (id);
alter table log.edu_room_apply_audit_logs add constraint fk_ocnnm4633lkwtpmkaceygx6rr foreign key (room_apply_id) references edu.room_applies (id);
alter table log.std_spa_downloads add constraint fk_2acwwn5dui0u3m2owmvoi6goy foreign key (doc_type_id) references code.std_doc_types (id);
alter table log.std_spa_downloads add constraint fk_mvpc8eu1o4bbwmmfcapnf1y5g foreign key (user_id) references base.users (id);
alter table log.std_spa_prints add constraint fk_6vt0ncl1pwau74i7p0pu5vuf3 foreign key (doc_type_id) references code.std_doc_types (id);
alter table log.std_spa_prints add constraint fk_hmsnog164pjw4uh5vp4q7j70w foreign key (user_id) references base.users (id);
alter table log.std_transfer_apply_logs add constraint fk_80tciq34qnijcxk27jyda5s2d foreign key (std_id) references base.students (id);
alter table prac.ability_credit_applies add constraint fk_32fokldnldp8y1koiqkyf2qpb foreign key (audit_depart_id) references base.departments (id);
alter table prac.ability_credit_applies add constraint fk_573nmlny5j6v2dbuwr2gbysxn foreign key (semester_id) references base.semesters (id);
alter table prac.ability_credit_applies add constraint fk_dllpy0vrhasggn9qfmj5scb78 foreign key (certificate_id) references code.certificates (id);
alter table prac.ability_credit_applies add constraint fk_fkudkyhtsh2vhpv3xd63u3283 foreign key (std_id) references base.students (id);
alter table prac.ability_credits add constraint fk_5g7yxjgu459avs4u0oi0q6wvy foreign key (std_id) references base.students (id);
alter table prac.inv_batches add constraint fk_rbblek4ak8rgxsyk0g6ex3d foreign key (school_id) references base.schools (id);
alter table prac.inv_closure_review_details add constraint fk_138363cb9cbwhx43o5qami1nt foreign key (level_id) references prac.inv_project_levels (id);
alter table prac.inv_closure_review_details add constraint fk_e96w6tq2o2ghuoyuy3xcxhii3 foreign key (expert_id) references prac.inv_experts (id);
alter table prac.inv_closure_review_details add constraint fk_eld2nw825u9ysnshtpx7s40tj foreign key (review_id) references prac.inv_closure_reviews (id);
alter table prac.inv_closure_review_groups add constraint fk_e78k8a0boulu71vg4u7cvkn4k foreign key (discipline_id) references code.disciplines (id);
alter table prac.inv_closure_review_groups add constraint fk_pbhb35bxe9ll3t91ccc07b08 foreign key (batch_id) references prac.inv_batches (id);
alter table prac.inv_closure_review_groups_experts add constraint fk_h2qumq1ewav6us6l8v4skqyti foreign key (expert_id) references prac.inv_experts (id);
alter table prac.inv_closure_review_groups_experts add constraint fk_kryxfb3rda5to3uxjmocvl952 foreign key (closure_review_group_id) references prac.inv_closure_review_groups (id);
alter table prac.inv_closure_reviews add constraint fk_453biu8w15qgm23pn1k3l0htt foreign key (project_id) references prac.inv_projects (id);
alter table prac.inv_closure_reviews add constraint fk_9k9ncwequc7jyl0h7ulxbmck9 foreign key (group_id) references prac.inv_closure_review_groups (id);
alter table prac.inv_closures add constraint fk_20b861ko3aq757otnh9yfe5lr foreign key (project_id) references prac.inv_projects (id);
alter table prac.inv_init_review_details add constraint fk_j3t3ktl0n4vkvitn5txvyb4qd foreign key (review_id) references prac.inv_init_reviews (id);
alter table prac.inv_init_review_details add constraint fk_tbtk4sltmofrhwsatpfdic96y foreign key (expert_id) references prac.inv_experts (id);
alter table prac.inv_init_review_groups add constraint fk_d6uu9asbcitydjrrysdcjyriq foreign key (batch_id) references prac.inv_batches (id);
alter table prac.inv_init_review_groups add constraint fk_tgiwi7niwho6cfpvbjs1fre9x foreign key (discipline_id) references code.disciplines (id);
alter table prac.inv_init_review_groups_experts add constraint fk_e5bsd1990f9l9ya46em4pjnig foreign key (expert_id) references prac.inv_experts (id);
alter table prac.inv_init_review_groups_experts add constraint fk_ixmcc3s264hf1edxkhd2p3uy9 foreign key (init_review_group_id) references prac.inv_init_review_groups (id);
alter table prac.inv_init_reviews add constraint fk_envdg7e8h3pe0p5a48widjx3k foreign key (group_id) references prac.inv_init_review_groups (id);
alter table prac.inv_init_reviews add constraint fk_mjw0h306lwaw8kjukhkh0skbv foreign key (project_id) references prac.inv_projects (id);
alter table prac.inv_introes add constraint fk_hq6smhkatuf3nqs7tb0dgmghi foreign key (project_id) references prac.inv_projects (id);
alter table prac.inv_level_jounals add constraint fk_2eq82wpeqv2ilul12bgy3qy6p foreign key (level_id) references prac.inv_project_levels (id);
alter table prac.inv_level_jounals add constraint fk_eo0snpxik29a731vjf20eh4xt foreign key (project_id) references prac.inv_projects (id);
alter table prac.inv_materials add constraint fk_ddo8682bgggcaonvngm9la4og foreign key (project_id) references prac.inv_projects (id);
alter table prac.inv_materials add constraint fk_on4hslgku96doeepqqh7x9441 foreign key (stage_type_id) references prac.inv_stage_types (id);
alter table prac.inv_members add constraint fk_h0nkvpnwjyah5fcrnyry09hx0 foreign key (project_id) references prac.inv_projects (id);
alter table prac.inv_members add constraint fk_ki9j0iiyvi3gka13yjj9fbynm foreign key (std_id) references base.students (id);
alter table prac.inv_projects add constraint fk_69kak44bmoei29sx7urs44api foreign key (manager_id) references prac.inv_members (id);
alter table prac.inv_projects add constraint fk_8ybt1ah0lvmvclpg9ldd1658y foreign key (batch_id) references prac.inv_batches (id);
alter table prac.inv_projects add constraint fk_byd37rtkeyn352fcg005l65k foreign key (level_id) references prac.inv_project_levels (id);
alter table prac.inv_projects add constraint fk_m48wmqcdgnxcddjs54f09cq1r foreign key (category_id) references prac.inv_project_categories (id);
alter table prac.inv_projects add constraint fk_mt83f3yff6d6wdyray1lefc58 foreign key (intro_id) references prac.inv_introes (id);
alter table prac.inv_projects add constraint fk_o0jf964sh6nmm4m9pjgo4asph foreign key (state_id) references prac.inv_project_states (id);
alter table prac.inv_projects add constraint fk_pehvbrx0tb660335yjpf8r2qs foreign key (discipline_id) references code.disciplines (id);
alter table prac.inv_projects add constraint fk_sgudf377rbi36gv7wo7n9rvjp foreign key (department_id) references base.departments (id);
alter table prac.inv_projects_instructors add constraint fk_m521en83ui55j1libpddu1mne foreign key (project_id) references prac.inv_projects (id);
alter table prac.inv_projects_instructors add constraint fk_nkm4etju7a3kjb8h52p2h1ujj foreign key (teacher_id) references base.teachers (id);
alter table prac.inv_promotion_defense_groups add constraint fk_dlofenq6ue5er1402n64fuf6e foreign key (batch_id) references prac.inv_batches (id);
alter table prac.inv_promotion_defense_members add constraint fk_i0264dwyp2s8j2sjnw8r0duwi foreign key (group_id) references prac.inv_promotion_defense_groups (id);
alter table prac.inv_promotion_defense_members add constraint fk_sh7gkxgum9ean06dmamngquan foreign key (project_id) references prac.inv_projects (id);
alter table prac.inv_stage_types add constraint fk_q7dhhoctf5x8jukrjuoyns5cu foreign key (parent_id) references prac.inv_stage_types (id);
alter table prac.inv_stages add constraint fk_ghkuplc5vylvh7jgh8j3y2eyv foreign key (stage_type_id) references prac.inv_stage_types (id);
alter table prac.inv_stages add constraint fk_lkxaneffobg1pemrc0na4446g foreign key (batch_id) references prac.inv_batches (id);
alter table prac.prac_activities add constraint fk_4pg9jxejy64vv9mjrv1bsxesu foreign key (semester_id) references base.semesters (id);
alter table prac.prac_activities add constraint fk_c4bsxhdo0jtabw57h2ird9qqu foreign key (project_id) references base.projects (id);
alter table prac.prac_activities add constraint fk_isv2ox2hb768emrxjrmlccu8u foreign key (activity_type_id) references code.prac_activity_types (id);
alter table prac.prac_activities add constraint fk_ng2g7iqmxh7j49h3rnr1hh50p foreign key (department_id) references base.departments (id);
alter table prac.prac_activities_teachers add constraint fk_r19n18fgti2v2kcax3vf397qf foreign key (user_id) references base.users (id);
alter table prac.prac_activities_teachers add constraint fk_sbrmcefo1k7ge040byomyurxu foreign key (prac_activity_id) references prac.prac_activities (id);
alter table prac.prac_activity_schedules add constraint fk_ehfpf868ykup0ua4k2f3xk71h foreign key (activity_id) references prac.prac_activities (id);
alter table prac.prac_activity_schedules add constraint fk_mpvvellaugmncxcu7l906l73j foreign key (teaching_method_id) references code.teaching_methods (id);
alter table prac.prac_activity_schedules_teachers add constraint fk_et0ft6qvkgursin02xcd582do foreign key (prac_activity_schedule_id) references prac.prac_activity_schedules (id);
alter table prac.prac_activity_schedules_teachers add constraint fk_kn8meyebu2xv6ffc1alwpgi9m foreign key (user_id) references base.users (id);
alter table prac.prac_clazz_schedules add constraint fk_4trjfdfsffrmxjm5lsi5iso9l foreign key (activity_id) references prac.prac_clazzes (id);
alter table prac.prac_clazz_schedules add constraint fk_6828lk3f80ecupmsynewxnavo foreign key (teaching_method_id) references code.teaching_methods (id);
alter table prac.prac_clazz_schedules_teachers add constraint fk_8d5mu8w5tyhw8id11oxvuhkf7 foreign key (user_id) references base.users (id);
alter table prac.prac_clazz_schedules_teachers add constraint fk_c87nuj5ni77hscromf0ootkjw foreign key (prac_clazz_schedule_id) references prac.prac_clazz_schedules (id);
alter table prac.prac_clazzes add constraint fk_42codv4qbqywkp9yyyfphgjwh foreign key (semester_id) references base.semesters (id);
alter table prac.prac_clazzes add constraint fk_80drhdh0bou9tno01wt3x4j9d foreign key (course_id) references base.courses (id);
alter table prac.prac_clazzes add constraint fk_e90tpvxp8gm4htpvxvuqc05dd foreign key (course_type_id) references code.course_types (id);
alter table prac.prac_clazzes add constraint fk_hrdcy3cqyo6jl7qmgfi0jk6rx foreign key (lang_type_id) references code.teach_lang_types (id);
alter table prac.prac_clazzes add constraint fk_kxsvh4eu5mxdm5o03fngyrn2o foreign key (department_id) references base.departments (id);
alter table prac.prac_clazzes add constraint fk_tpe1gh13nmdxiqp6lhjf9eiw2 foreign key (project_id) references base.projects (id);
alter table prac.prac_clazzes_teachers add constraint fk_18sg1dqds95gb88scjlgeat11 foreign key (prac_clazz_id) references prac.prac_clazzes (id);
alter table prac.prac_clazzes_teachers add constraint fk_72gmihbglgkgu443pcf198dwx foreign key (user_id) references base.users (id);
alter table prac.std_practice_hours add constraint fk_j3hpd9ija7mcq8ibrgiwk7co3 foreign key (std_id) references base.students (id);
alter table prac.std_practice_hours add constraint fk_opk7pt9ku3etujtwalom6nove foreign key (category_id) references code.std_practice_categories (id);
alter table prac.std_practice_infoes add constraint fk_1y9bnfpxtfrev6ww154jorf9v foreign key (category_id) references code.std_practice_categories (id);
alter table prac.std_practice_infoes add constraint fk_gcpstqnkqrl3st6f1liodc1t5 foreign key (std_id) references base.students (id);
alter table prac.std_practice_infoes add constraint fk_r9n8db2kkmxyq7oe1xpuwmig9 foreign key (practice_type_id) references code.std_practice_types (id);
alter table qos.assess_criterias add constraint fk_gx0bhttyftiq3c5fr0db2sa7b foreign key (project_id) references base.projects (id);
alter table qos.assess_grades add constraint fk_a81mudq3ic0lspftcgy4alb72 foreign key (criteria_id) references qos.assess_criterias (id);
alter table qos.category_eval_stats add constraint fk_3fh0ch9fbc8fs0wwko8us5ht0 foreign key (category_id) references code.course_categories (id);
alter table qos.category_eval_stats add constraint fk_9bmdudwl0qf9fox0s2k7apfll foreign key (project_id) references base.projects (id);
alter table qos.category_eval_stats add constraint fk_9xw1pix8ja5k7y1mi8u7mbkyl foreign key (semester_id) references base.semesters (id);
alter table qos.category_stat_grades add constraint fk_3755p6lxswbas19671d2pk5d6 foreign key (stat_id) references qos.category_eval_stats (id);
alter table qos.category_stat_grades add constraint fk_l1r604gaubfm0qx0lq2ufm45t foreign key (grade_id) references qos.assess_grades (id);
alter table qos.category_stat_grades add constraint fk_lr4kul7fuga3lsxdj20i6x6bp foreign key (indicator_id) references qos.indicators (id);
alter table qos.category_stat_ranges add constraint fk_bie7mnvp8ja7d7cs6hd113ypi foreign key (indicator_id) references qos.indicators (id);
alter table qos.category_stat_ranges add constraint fk_cbe3ybr3krou64jvx1n7bukxw foreign key (stat_id) references qos.category_eval_stats (id);
alter table qos.course_eval_stats add constraint fk_1kguqd3htrmryr5s60kk25qfc foreign key (teach_depart_id) references base.departments (id);
alter table qos.course_eval_stats add constraint fk_b1h9ad2cub35dlxue8lknghw8 foreign key (course_id) references base.courses (id);
alter table qos.course_eval_stats add constraint fk_h2mi0yjlg23x4xsk2yncesr2h foreign key (category_id) references code.course_categories (id);
alter table qos.course_eval_stats add constraint fk_jkay8xuppxym5ot221d8h1ugo foreign key (teacher_depart_id) references base.departments (id);
alter table qos.course_eval_stats add constraint fk_k91v451052gdgjfehyjdhg0bj foreign key (project_id) references base.projects (id);
alter table qos.course_eval_stats add constraint fk_qbhxhtmtr9854cvvt8y7wjww9 foreign key (grade_id) references qos.assess_grades (id);
alter table qos.course_eval_stats add constraint fk_siuwuj8lwd62irgqutj44glvx foreign key (semester_id) references base.semesters (id);
alter table qos.course_eval_stats add constraint fk_tl39jj1d4fn0ihhr1slekds3u foreign key (teacher_id) references base.teachers (id);
alter table qos.course_indicator_stats add constraint fk_6wt42vsvtdf2ru79h002g6wmx foreign key (grade_id) references qos.assess_grades (id);
alter table qos.course_indicator_stats add constraint fk_bgmfops1ekrgmytj0vy24x9bd foreign key (indicator_id) references qos.indicators (id);
alter table qos.course_indicator_stats add constraint fk_lq3spm4x9ufoudta7d6cjyyqw foreign key (stat_id) references qos.course_eval_stats (id);
alter table qos.course_option_stats add constraint fk_8uo4tm99ey30ijp51qlpl7xm0 foreign key (option_id) references qos.options (id);
alter table qos.course_option_stats add constraint fk_s4bf8g5qts1r52yh8i3d4sr5w foreign key (question_stat_id) references qos.course_question_stats (id);
alter table qos.course_question_stats add constraint fk_hmxa9b4pobpeapuacdd5ynim1 foreign key (question_id) references qos.questions (id);
alter table qos.course_question_stats add constraint fk_qv7vwv5ntk4dkt7731phbb6vb foreign key (stat_id) references qos.course_eval_stats (id);
alter table qos.depart_eval_stats add constraint fk_gb75kx2jvlj0ql138gl08yse4 foreign key (department_id) references base.departments (id);
alter table qos.depart_eval_stats add constraint fk_q6xeu7d7eowkemdd9o1ybws1m foreign key (semester_id) references base.semesters (id);
alter table qos.depart_eval_stats add constraint fk_qw33jhluthik7qn0ipdbutaid foreign key (project_id) references base.projects (id);
alter table qos.evaluate_results add constraint fk_1dbdxgm1fax57ghqmol8giwys foreign key (student_id) references base.students (id);
alter table qos.evaluate_results add constraint fk_f463duaylhk4rpk8w3lfc09w7 foreign key (questionnaire_id) references qos.questionnaires (id);
alter table qos.evaluate_results add constraint fk_ipd6qsb0kx9kh1ifviamq2qim foreign key (clazz_id) references edu.clazzes (id);
alter table qos.evaluate_results add constraint fk_j9lj6i2jgwihedt31golv9dst foreign key (department_id) references base.departments (id);
alter table qos.evaluate_results add constraint fk_nguuxh186sgjj6hxtnlf0j1 foreign key (teacher_id) references base.teachers (id);
alter table qos.feedbacks add constraint fk_5qgvah681aw6iacq15hge2lb9 foreign key (semester_id) references base.semesters (id);
alter table qos.feedbacks add constraint fk_e3vx0idffx6adfvw0xwghw6b5 foreign key (std_id) references base.students (id);
alter table qos.feedbacks add constraint fk_fnj2ku2nnbtk7x0hmnp85jhdu foreign key (teach_depart_id) references base.departments (id);
alter table qos.feedbacks add constraint fk_kmb4xm2mu42sp99hn4o0v3knf foreign key (teacher_id) references base.teachers (id);
alter table qos.feedbacks add constraint fk_pafds1ak183b9x26jdv9xnvof foreign key (course_id) references base.courses (id);
alter table qos.final_comments add constraint fk_2f10ltlpjukdgusoftx57iy61 foreign key (course_id) references base.courses (id);
alter table qos.final_comments add constraint fk_4pufe3ur3xf0qitwcxowbavws foreign key (semester_id) references base.semesters (id);
alter table qos.final_comments add constraint fk_62lr6mox7gdluwtfxnjjomwxw foreign key (teach_depart_id) references base.departments (id);
alter table qos.final_comments add constraint fk_g80ovta5bhw3mqjp84n8aasro foreign key (std_id) references base.students (id);
alter table qos.final_comments add constraint fk_grkxa0bsm7keh6g2cu4pmkeef foreign key (teacher_id) references base.teachers (id);
alter table qos.final_teacher_scores add constraint fk_7jgxesmyele51sj6wtwstekkv foreign key (teacher_id) references base.teachers (id);
alter table qos.final_teacher_scores add constraint fk_d1dixthi7qop55q4bugwvec4m foreign key (semester_id) references base.semesters (id);
alter table qos.indicators add constraint fk_t8ndgaj2djs97kxvb7njf3mff foreign key (project_id) references base.projects (id);
alter table qos.option_groups add constraint fk_hcs902jiv6l0c7f45jfvrktyg foreign key (project_id) references base.projects (id);
alter table qos.options add constraint fk_hpqk29lfhbr1wbwybwuddvsks foreign key (group_id) references qos.option_groups (id);
alter table qos.question_results add constraint fk_1l78gqw0wiy5wd3p1l5jsaeth foreign key (result_id) references qos.evaluate_results (id);
alter table qos.question_results add constraint fk_klak3v8y8oniosgx9cj8yqq2 foreign key (question_id) references qos.questions (id);
alter table qos.question_results add constraint fk_q08nm7m6y0mjdnbd6t9hon96d foreign key (indicator_id) references qos.indicators (id);
alter table qos.question_results add constraint fk_sj3m0oryd1u1mciwwr2pmwltx foreign key (option_id) references qos.options (id);
alter table qos.questionnaire_clazzes add constraint fk_26galbjyiv8hsnjhp5f2c9i2l foreign key (questionnaire_id) references qos.questionnaires (id);
alter table qos.questionnaire_clazzes add constraint fk_6b1buq5hdn0idm47506ltm1kx foreign key (clazz_id) references edu.clazzes (id);
alter table qos.questionnaires add constraint fk_ti2wlqn9y5ufjsmjsefhy0x9f foreign key (project_id) references base.projects (id);
alter table qos.questionnaires_questions add constraint fk_9salqckmwfhtwcrnrhotrycml foreign key (questionnaire_id) references qos.questionnaires (id);
alter table qos.questionnaires_questions add constraint fk_jwuvhyx2n433p6giafir1gwui foreign key (question_id) references qos.questions (id);
alter table qos.questions add constraint fk_2fu26lrkk4gn4ea9to9g1um80 foreign key (option_group_id) references qos.option_groups (id);
alter table qos.questions add constraint fk_f9cmq7e9hran48hq4i5g4toid foreign key (indicator_id) references qos.indicators (id);
alter table qos.questions add constraint fk_sawvciw2vf51vpswv49odfo6k foreign key (project_id) references base.projects (id);
alter table qos.school_eval_stats add constraint fk_e69lbg5qwt60dt7uu1v8ndsix foreign key (semester_id) references base.semesters (id);
alter table qos.school_eval_stats add constraint fk_spfd4m6ixp7du7wdpng2fa5uf foreign key (project_id) references base.projects (id);
alter table std.archive_docs add constraint fk_cudju8jp9f2a5h8a6fb11rk59 foreign key (std_id) references base.students (id);
alter table std.archive_docs add constraint fk_rglcljk9d35lj7jhm4xxfd5m9 foreign key (doc_type_id) references code.std_doc_types (id);
alter table std.bachelor2nd_applies add constraint fk_andud56x2l3iml18sbwnfo5uc foreign key (std_id) references base.students (id);
alter table std.bachelor2nd_applies add constraint fk_t1u7i0rbj9f9vkvdknv560oc foreign key (batch_id) references std.graduate_batches (id);
alter table std.bills add constraint fk_41m9kr1o92cv7q88op398202o foreign key (semester_id) references base.semesters (id);
alter table std.bills add constraint fk_co66rqwu28ov4xe3yaxrpwcan foreign key (depart_id) references base.departments (id);
alter table std.bills add constraint fk_g9n5t2yw6pc67cp9jcr0ftw13 foreign key (fee_type_id) references code.fee_types (id);
alter table std.bills add constraint fk_mg2ghcc0q4axd28u7sqocnqr3 foreign key (std_id) references base.students (id);
alter table std.contacts add constraint fk_no8nopnnx0rx9vbpbwopgt6c1 foreign key (std_id) references base.students (id);
alter table std.debts add constraint fk_dryv9ol3s8bo9ykcmxhytp4pb foreign key (fee_type_id) references code.fee_types (id);
alter table std.debts add constraint fk_flmg2dl07o1dk9ns23avj676m foreign key (std_id) references base.students (id);
alter table std.degree_applies add constraint fk_cvxrhulaor1altau9ouvsa1ol foreign key (degree_id) references code.degrees (id);
alter table std.degree_applies add constraint fk_hmmawn8r4uvvxtuvwjh0qbxtu foreign key (batch_id) references std.graduate_batches (id);
alter table std.degree_applies add constraint fk_jwffbl6dn2b3apgq2mb8wk8g5 foreign key (std_id) references base.students (id);
alter table std.degree_results add constraint fk_2ghqqolc47bcajyassvpxyxi2 foreign key (std_id) references base.students (id);
alter table std.degree_results add constraint fk_4fu7o1vjyh4fy4vubu6extnm foreign key (batch_id) references std.graduate_batches (id);
alter table std.degree_results add constraint fk_hygf53m9m6lh0jn026nlj2rae foreign key (degree_id) references code.degrees (id);
alter table std.edu_work_records add constraint fk_jy7pengfusx1lbwfbh0l2k6is foreign key (std_id) references base.students (id);
alter table std.examinees add constraint fk_3wg4b6cmq6p78epdcvaqtjs9p foreign key (std_id) references base.students (id);
alter table std.examinees add constraint fk_6e33icgq0qssekehpga9n77pr foreign key (major_id) references base.majors (id);
alter table std.examinees add constraint fk_93owp5k002dba0ep2ik9xdj5x foreign key (origin_division_id) references code.divisions (id);
alter table std.examinees add constraint fk_pmvt794yxsrbdf2asttcagv0j foreign key (enroll_mode_id) references code.enroll_modes (id);
alter table std.examinees add constraint fk_qkvgf74yg71uom0fv2fmlcq6b foreign key (education_mode_id) references code.education_modes (id);
alter table std.exchange_programs add constraint fk_cwq1p3629513kh6yj165ciav4 foreign key (project_id) references base.projects (id);
alter table std.exchange_programs_schools add constraint fk_5t7s1x3fvpnlo91ugo0qcp4u3 foreign key (exchange_program_id) references std.exchange_programs (id);
alter table std.exchange_programs_schools add constraint fk_fc6hj8pr1rmq0oyfuaocumded foreign key (extern_school_id) references base.extern_schools (id);
alter table std.foreigners add constraint fk_hv593ojmt7ametqoymsbqr3ab foreign key (std_id) references base.students (id);
alter table std.freshmen add constraint fk_1udl9cfjup34peemkros8j4ww foreign key (study_type_id) references code.study_types (id);
alter table std.freshmen add constraint fk_27th0rt0neox2qok0b5hpkm4u foreign key (id_type_id) references code.id_types (id);
alter table std.freshmen add constraint fk_2xlf5f1ypf7w6ji93vv6337tf foreign key (tutor_id) references base.teachers (id);
alter table std.freshmen add constraint fk_6nvjp9xdpou7a7ir6pwy4j926 foreign key (department_id) references base.departments (id);
alter table std.freshmen add constraint fk_a45mi6dqvvnoq209afgwha7iw foreign key (direction_id) references base.major_directions (id);
alter table std.freshmen add constraint fk_a5hrpbhyuie2fsw905xkunrwy foreign key (political_status_id) references code.political_statuses (id);
alter table std.freshmen add constraint fk_a82djbhcy2i2btxo98y54absc foreign key (gender_id) references code.genders (id);
alter table std.freshmen add constraint fk_ahhn6oub9wnte6ofxxyex62pv foreign key (level_id) references code.education_levels (id);
alter table std.freshmen add constraint fk_e1tgfyryon9c5hknvugw71c38 foreign key (education_mode_id) references code.education_modes (id);
alter table std.freshmen add constraint fk_ejb6tvo25w9b5k0mywnuuta27 foreign key (std_type_id) references code.std_types (id);
alter table std.freshmen add constraint fk_fddi16oqn5inobbk32rrjg6t4 foreign key (country_id) references code.countries (id);
alter table std.freshmen add constraint fk_fxt5rnntkbv4gymh08289iqgn foreign key (project_id) references base.projects (id);
alter table std.freshmen add constraint fk_g5s0gkf335sohor3dgd4o52st foreign key (major_id) references base.majors (id);
alter table std.freshmen add constraint fk_h2d5o6pnycdc1ha5i66rok7i5 foreign key (grade_id) references base.grades (id);
alter table std.freshmen add constraint fk_j15jd82159kxf35yxyjmblumj foreign key (nation_id) references code.nations (id);
alter table std.freshmen add constraint fk_jmqk5s31u86ij18e8h8rl8ix0 foreign key (marital_status_id) references code.marital_statuses (id);
alter table std.freshmen add constraint fk_myhlt82713t67n87kk2slcnji foreign key (edu_type_id) references code.education_types (id);
alter table std.freshmen add constraint fk_nfq6v4efsgpgthfusri3x4vwg foreign key (last_edu_degree_id) references code.education_degrees (id);
alter table std.freshmen add constraint fk_t1rsfiwxjvx3i6mv0v4davg1k foreign key (squad_id) references base.squads (id);
alter table std.graduate_batches add constraint fk_agc5vvljc0k1jfh5ds42uw0m9 foreign key (season_id) references base.graduate_seasons (id);
alter table std.graduate_batches add constraint fk_s9tvq5nvr755rhonwaw7ru6fl foreign key (project_id) references base.projects (id);
alter table std.graduate_results add constraint fk_60tarsb0wps3cmsumt4fmx7ki foreign key (std_id) references base.students (id);
alter table std.graduate_results add constraint fk_aw2crvlxuwnxsbyexehnmhbnj foreign key (education_result_id) references code.education_results (id);
alter table std.graduate_results add constraint fk_hbuho60rwd7cp7n9jd316qqk1 foreign key (batch_id) references std.graduate_batches (id);
alter table std.graduations add constraint fk_g3b2w9le8nidh58ljm8no5thx foreign key (std_id) references base.students (id);
alter table std.graduations add constraint fk_q24s55av6uspu1tfc0y03nfpx foreign key (graduate_type_id) references code.graduate_types (id);
alter table std.graduations add constraint fk_r259rmkgu60ftfgiv39y4vbqd foreign key (batch_id) references std.graduate_batches (id);
alter table std.homes add constraint fk_2jfv7xmyr6h8ck7yuqts1u19l foreign key (railway_station_id) references code.railway_stations (id);
alter table std.homes add constraint fk_5v07xkxvnikjfgqbnwlipolem foreign key (std_id) references base.students (id);
alter table std.honor_awards add constraint fk_4vxl7einwwt4fa6639f4qh0df foreign key (level_id) references std.honor_levels (id);
alter table std.honor_awards add constraint fk_g1d5o5fxijy6bh3fs9r2nndd3 foreign key (semester_id) references base.semesters (id);
alter table std.honor_awards add constraint fk_qqmjq35p8vobp1pq9fhogmld8 foreign key (std_id) references base.students (id);
alter table std.honor_awards add constraint fk_rlsipkemb44v8n72x69e7un1b foreign key (category_id) references std.honor_categories (id);
alter table std.honor_categories add constraint fk_tprm8wlvlnjfrfjc33itswx0 foreign key (honor_type_id) references std.honor_types (id);
alter table std.honor_levels add constraint fk_3aqqfv9qjy34j7xxvh8l6r8tk foreign key (category_id) references std.honor_categories (id);
alter table std.major_students add constraint fk_1lx0tl1prjs7ly8cgr5lncoua foreign key (school_id) references code.institutions (id);
alter table std.major_students add constraint fk_bjendbfhimlwy2g07kal9it67 foreign key (std_id) references base.students (id);
alter table std.major_students add constraint fk_qjcwhjswcs0oq4j5oyxntmy8d foreign key (major_category_id) references code.discipline_categories (id);
alter table std.minor_signup_options add constraint fk_42t72mbjc6mw0thib3v1wshrk foreign key (major_id) references base.minor_majors (id);
alter table std.minor_signup_options add constraint fk_ip4ipdmxiyo2iuboed7whyofe foreign key (setting_id) references std.minor_signup_settings (id);
alter table std.minor_signup_settings add constraint fk_44iq2pwbkab24k9e5mweoecxs foreign key (project_id) references base.projects (id);
alter table std.minor_signup_std_majors add constraint fk_c9npq9pgbcrhy893tq5n54rxc foreign key (major_id) references base.minor_majors (id);
alter table std.minor_signup_std_majors add constraint fk_rg6p98r4bpxlmusrdxjd6mqvr foreign key (std_id) references std.minor_signup_stds (id);
alter table std.minor_signup_stds add constraint fk_52nhs8fsp9uqvecbhgxn0emnl foreign key (category_id) references code.discipline_categories (id);
alter table std.minor_signup_stds add constraint fk_9qgk9thlvafo1f6i0rv1idqt1 foreign key (setting_id) references std.minor_signup_settings (id);
alter table std.minor_signup_stds add constraint fk_ggee3uuam9r91bpfjcrh05d98 foreign key (institution_id) references code.institutions (id);
alter table std.minor_signup_stds add constraint fk_llys1ya5u6mbnflrrmoarbobj foreign key (gender_id) references code.genders (id);
alter table std.orders add constraint fk_3dqe88rim46vdltxjdeo8lvi5 foreign key (bill_id) references std.bills (id);
alter table std.orders add constraint fk_hnkrx4fhp4c4lsdcjaoc913um foreign key (std_id) references base.students (id);
alter table std.person_check_items add constraint fk_ah4keqpuunawoafqs3opp4hc foreign key (check_id) references std.person_checks (id);
alter table std.person_checks add constraint fk_vx8kslxe9v9ehbpp7b5dttaf foreign key (std_id) references base.students (id);
alter table std.plan_result_checks add constraint fk_jo1ysavmd3v0y8f2odeo17sb2 foreign key (std_id) references base.students (id);
alter table std.punishments add constraint fk_8nk8fjmdj5ha71jlp1auqk5j8 foreign key (semester_id) references base.semesters (id);
alter table std.punishments add constraint fk_hidl8et9oewgb463jg2hg9ar7 foreign key (publishment_type_id) references code.std_punishment_types (id);
alter table std.punishments add constraint fk_itujqw0pkp4j6qlcqpanlf9a foreign key (depart_id) references base.departments (id);
alter table std.punishments add constraint fk_mtkduknxkugka6i94ij538d70 foreign key (std_id) references base.students (id);
alter table std.registers add constraint fk_f075dqxnn8v595dbjljhee4kc foreign key (semester_id) references base.semesters (id);
alter table std.registers add constraint fk_io7r4boti2t4wbqonoiw8fmn5 foreign key (unregistered_reason_id) references code.unregistered_reasons (id);
alter table std.registers add constraint fk_n9ui5oxynn62fmyur5ub98hag foreign key (uncheckin_reason_id) references code.uncheckin_reasons (id);
alter table std.registers add constraint fk_prenu0jhgioorobiioof0wvre foreign key (std_id) references base.students (id);
alter table std.scholarship_awards add constraint fk_5p9wb4s3iif6n5j4fth5w4un5 foreign key (std_id) references base.students (id);
alter table std.scholarship_awards add constraint fk_a44si7c40yj4viuugt2jfcun4 foreign key (level_id) references std.scholarship_levels (id);
alter table std.scholarship_awards add constraint fk_o7v1m9gkq9pl5x3mp6llmciyn foreign key (semester_id) references base.semesters (id);
alter table std.scholarship_awards add constraint fk_sn7r7s6rpxdd0o8vm1h9vfrm0 foreign key (category_id) references std.scholarship_categories (id);
alter table std.scholarship_categories add constraint fk_3s1i0adnxwmyt8dlj66g4hu18 foreign key (scholarship_type_id) references std.scholarship_types (id);
alter table std.scholarship_levels add constraint fk_q2tcpqcih68owdqkev3wo09w9 foreign key (category_id) references std.scholarship_categories (id);
alter table std.social_relations add constraint fk_4y95e8ow9ijrr7443wy3inkjj foreign key (id_type_id) references code.id_types (id);
alter table std.social_relations add constraint fk_bkj2udhihdk4dx9ixwcrb0gh2 foreign key (relationship_id) references code.family_relationships (id);
alter table std.social_relations add constraint fk_bm1jgjtls0uyr8ust9q6p95l7 foreign key (std_id) references base.students (id);
alter table std.spa_print_quotas add constraint fk_g0pqxf6qkmvi66l97n27ofjmq foreign key (doc_type_id) references code.std_doc_types (id);
alter table std.spa_print_quotas add constraint fk_j8e9gur90kg881kxdx3murai0 foreign key (user_id) references base.users (id);
alter table std.std_alter_applies add constraint fk_hhvysmtw20mqk9riv29u4peh9 foreign key (alter_type_id) references code.std_alter_types (id);
alter table std.std_alter_applies add constraint fk_p13ofvyw587ihey8v0ppagk7o foreign key (std_id) references base.students (id);
alter table std.std_alter_apply_steps add constraint fk_djav4w1k1xi29jwmksgjml797 foreign key (assignee_id) references base.users (id);
alter table std.std_alter_apply_steps add constraint fk_ps6ewc9g5p2jjkqrst5llmrv6 foreign key (alter_apply_id) references std.std_alter_applies (id);
alter table std.std_alteration_items add constraint fk_sweyr51xf0p628c8jsgds5htl foreign key (alteration_id) references std.std_alterations (id);
alter table std.std_alterations add constraint fk_5idqwh89srxe5wyu3sde9a0w8 foreign key (std_id) references base.students (id);
alter table std.std_alterations add constraint fk_76u6m29f9ysvfwer2t3wn09gj foreign key (reason_id) references code.std_alter_reasons (id);
alter table std.std_alterations add constraint fk_ax8cric3f75uk5fm9nvsnb9un foreign key (alter_type_id) references code.std_alter_types (id);
alter table std.std_alterations add constraint fk_r0vbetfoxnoqqwu5vkmh2f1l0 foreign key (semester_id) references base.semesters (id);
alter table std.stipend_awards add constraint fk_buvr999au00c6gbtychgfxj4s foreign key (level_id) references std.stipend_levels (id);
alter table std.stipend_awards add constraint fk_gcgc564nfx1rug5xloyilb0hn foreign key (std_id) references base.students (id);
alter table std.stipend_awards add constraint fk_lat40nl08flxgoh6dv65ol4qs foreign key (category_id) references std.stipend_categories (id);
alter table std.stipend_awards add constraint fk_ta8gudrf6hwwpp9xffhv7qqp8 foreign key (semester_id) references base.semesters (id);
alter table std.stipend_levels add constraint fk_59d6msw9t0d2r1oij5v19n1sn foreign key (category_id) references std.stipend_categories (id);
alter table std.subsidy_awards add constraint fk_gnaviqn6xmeh4phlsp81gd1h5 foreign key (category_id) references std.subsidy_categories (id);
alter table std.subsidy_awards add constraint fk_gpqbax2pcpyc67oc9mbxw4gdu foreign key (semester_id) references base.semesters (id);
alter table std.subsidy_awards add constraint fk_gqx3mhu4k76u6ujmh4y0q9eqr foreign key (level_id) references std.subsidy_levels (id);
alter table std.subsidy_awards add constraint fk_lerb5la5f31m01taxr33ix2l0 foreign key (std_id) references base.students (id);
alter table std.subsidy_levels add constraint fk_6qdyl7ovq4kjd2vydmywgmfat foreign key (category_id) references std.subsidy_categories (id);
alter table std.transfer_applies add constraint fk_31v1gc0b4ntg6aua5uhg5cy1r foreign key (to_direction_id) references base.major_directions (id);
alter table std.transfer_applies add constraint fk_8ggtvvyf7bonjd0m5bw8dbjob foreign key (to_depart_id) references base.departments (id);
alter table std.transfer_applies add constraint fk_a1srslcfco8wsi7x1l5l3fjjv foreign key (from_depart_id) references base.departments (id);
alter table std.transfer_applies add constraint fk_a5xnl2hb05tibcbkvnlbtq5e1 foreign key (from_squad_id) references base.squads (id);
alter table std.transfer_applies add constraint fk_ai3ekvd5v55ilqut2fhrci939 foreign key (option_id) references cfg.std_transfer_options (id);
alter table std.transfer_applies add constraint fk_c2r85bhsmqrjsqh6cya1bladw foreign key (from_direction_id) references base.major_directions (id);
alter table std.transfer_applies add constraint fk_ebwakf7n9paro4583bj7gfeys foreign key (from_major_id) references base.majors (id);
alter table std.transfer_applies add constraint fk_fw87t8gs6rhqjlv2t6aqw99pp foreign key (to_squad_id) references base.squads (id);
alter table std.transfer_applies add constraint fk_ia2lww4yn37qo57xd6766b7se foreign key (from_grade_id) references base.grades (id);
alter table std.transfer_applies add constraint fk_l6gnyhfhva8jor8wmrmn2els5 foreign key (to_grade_id) references base.grades (id);
alter table std.transfer_applies add constraint fk_nlm2aprs590optbk9jg8jqupm foreign key (to_major_id) references base.majors (id);
alter table std.transfer_applies add constraint fk_nw4ufpanqlfnctqieusola9xp foreign key (std_id) references base.students (id);
alter table trd.rd_achievement_awards add constraint fk_44j8kfjd2ja3u8qlj56j5d180 foreign key (level_id) references code.rd_levels (id);
alter table trd.rd_achievement_awards add constraint fk_ddndd7lhul3j63b3f98v49r8d foreign key (grade_id) references code.rd_award_grades (id);
alter table trd.rd_achievement_awards add constraint fk_oxp7bebss19larnn3t0nb14gp foreign key (achievement_id) references trd.rd_achievements (id);
alter table trd.rd_achievement_members add constraint fk_jsxdglbdv51m9kbj295otnt3v foreign key (user_id) references base.users (id);
alter table trd.rd_achievement_members add constraint fk_tr48v1ys65adxli6vukmd9l66 foreign key (achievement_id) references trd.rd_achievements (id);
alter table trd.rd_achievements add constraint fk_sgffqts7wdj8k2vrtrpvlq0d1 foreign key (achievement_type_id) references trd.rd_achievement_types (id);
alter table trd.rd_project_members add constraint fk_b1y6ss7h1kn4xp7wtgnl3ihj9 foreign key (project_id) references trd.rd_projects (id);
alter table trd.rd_project_members add constraint fk_dqj4rjwrly2grgaonlanwxyvm foreign key (user_id) references base.users (id);
alter table trd.rd_projects add constraint fk_3n41csujj883di3pustjmihnd foreign key (level_id) references code.rd_levels (id);
alter table trd.rd_projects add constraint fk_ekyb4syr9shdr4mvio1h07pf6 foreign key (department_id) references base.departments (id);
alter table trd.rd_projects add constraint fk_k2vcs9vy3431k0tuf1nhn0ubu foreign key (category_id) references trd.rd_project_categories (id);
alter table trd.rd_projects add constraint fk_oicmoe4lx8mjag53ba812vs2s foreign key (status_id) references trd.rd_project_statuses (id);
alter table trd.rd_projects_leaders add constraint fk_fxa8grfxgh285tcrphy86vtky foreign key (rd_project_id) references trd.rd_projects (id);
alter table trd.rd_projects_leaders add constraint fk_lme51xpar41nsygthi5ti6kti foreign key (user_id) references base.users (id);
alter table trd.teaching_team_members add constraint fk_fspuaxe1a4elhn8xulnovu2dp foreign key (team_id) references trd.teaching_teams (id);
alter table trd.teaching_team_members add constraint fk_m78errt234ys34olo2fih3ky6 foreign key (user_id) references base.users (id);
alter table trd.teaching_teams add constraint fk_3o51s6k56umn5thxfoombqp19 foreign key (department_id) references base.departments (id);
alter table trd.teaching_teams add constraint fk_rk53xvi8yj1jey0tr1q3qs71w foreign key (level_id) references code.rd_levels (id);
alter table trd.teaching_teams_leaders add constraint fk_arns2gdyoytsqvrp4wld7jbln foreign key (user_id) references base.users (id);
alter table trd.teaching_teams_leaders add constraint fk_erqumximio9whgmyo69wokoch foreign key (teaching_team_id) references trd.teaching_teams (id);
alter table trd.textbook_achievements add constraint fk_sdlm5ueelu3dleay8hhvhbg1l foreign key (press_id) references code.presses (id);
alter table trd.textbook_awards add constraint fk_bqljtra85ba4yhal05n5o58b6 foreign key (grade_id) references code.rd_award_grades (id);
alter table trd.textbook_awards add constraint fk_h46np6gm06l99bci0qv2ntath foreign key (achievement_id) references trd.textbook_achievements (id);
alter table trd.textbook_awards add constraint fk_isow2pp9x9uso60iam7mn7npj foreign key (level_id) references code.rd_levels (id);
alter table trd.textbook_editors add constraint fk_flsg7iul201ccuoxp8c1l6bt4 foreign key (achievement_id) references trd.textbook_achievements (id);
alter table trd.textbook_editors add constraint fk_h1v8t8wt85nke81m3roa78437 foreign key (user_id) references base.users (id);
