-
Notifications
You must be signed in to change notification settings - Fork 8
refactor: 잘못 설정되었던 테이블 간 연관 관계 재설정 #622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
whqtker
merged 3 commits into
solid-connection:develop
from
whqtker:refactor/621-change-fk
Jan 24, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,100 +50,100 @@ VALUES ('[email protected]', 'yonso', 'https://github.com/nayonsoso.png', | |
|
|
||
| INSERT INTO home_university (id, name) VALUES (1, '인하대학교'); | ||
|
|
||
| INSERT INTO host_university(id, home_university_id, country_code, region_code, english_name, format_name, korean_name, | ||
| INSERT INTO host_university(id, country_code, region_code, english_name, format_name, korean_name, | ||
| accommodation_url, english_course_url, homepage_url, | ||
| details_for_local, logo_image_url, background_image_url) | ||
| VALUES (1, 1, 'US', 'AMERICAS', 'University of Guam', 'university_of_guam', '괌대학', | ||
| VALUES (1, 'US', 'AMERICAS', 'University of Guam', 'university_of_guam', '괌대학', | ||
| 'https://www.uog.edu/life-at-uog/residence-halls/', 'https://www.uog.edu/admissions/course-schedule', | ||
| 'https://www.uog.edu/admissions/international-students', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_guam/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_guam/1.png'), | ||
| (2, 1, 'US', 'AMERICAS', 'University of Nevada, Las Vegas', 'university_of_nevada_las_vegas', '네바다주립대학 라스베이거스', | ||
| (2, 'US', 'AMERICAS', 'University of Nevada, Las Vegas', 'university_of_nevada_las_vegas', '네바다주립대학 라스베이거스', | ||
| 'https://www.unlv.edu/housing', 'https://www.unlv.edu/engineering/academic-programs', | ||
| 'https://www.unlv.edu/engineering/eip', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_nevada_las_vegas/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_nevada_las_vegas/1.png'), | ||
| (3, 1, 'CA', 'AMERICAS', 'Memorial University of Newfoundland St. John''s', | ||
| (3, 'CA', 'AMERICAS', 'Memorial University of Newfoundland St. John''s', | ||
| 'memorial_university_of_newfoundland_st_johns', '메모리얼 대학 세인트존스', 'https://www.mun.ca/residences/', | ||
| 'https://www.mun.ca/regoff/registration-and-final-exams/course-offerings/', | ||
| 'https://mun.ca/goabroad/visiting-students-inbound/', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/memorial_university_of_newfoundland_st_johns/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/memorial_university_of_newfoundland_st_johns/1.png'), | ||
| (4, 1, 'AU', 'AMERICAS', 'University of Southern Queensland', 'university_of_southern_queensland', '서던퀸스랜드대학', | ||
| (4, 'AU', 'AMERICAS', 'University of Southern Queensland', 'university_of_southern_queensland', '서던퀸스랜드대학', | ||
| 'https://www.unisq.edu.au/current-students/support/accommodation', | ||
| 'https://www.unisq.edu.au/course/specification/current/', | ||
| 'https://www.unisq.edu.au/international/partnerships/study-abroad-exchange', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_southern_queensland/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_southern_queensland/1.png'), | ||
| (5, 1, 'AU', 'AMERICAS', 'University of Sydney', 'university_of_sydney', '시드니대학', | ||
| (5, 'AU', 'AMERICAS', 'University of Sydney', 'university_of_sydney', '시드니대학', | ||
| 'https://www.sydney.edu.au/study/accommodation.html', 'www.sydney.edu.au/sydney-abroad-units', | ||
| 'https://www.sydney.edu.au/', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_sydney/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_sydney/1.png'), | ||
| (6, 1, 'AU', 'AMERICAS', 'Curtin University', 'curtin_university', '커틴대학', | ||
| (6, 'AU', 'AMERICAS', 'Curtin University', 'curtin_university', '커틴대학', | ||
| 'https://www.curtin.edu.au/study/campus-life/accommodation/#perth', 'https://handbook.curtin.edu.au/', | ||
| 'https://www.curtin.edu.au/', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/curtin_university/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/curtin_university/1.png'), | ||
| (7, 1, 'DK', 'EUROPE', 'University of Southern Denmark', 'university_of_southern_denmark', '서던덴마크대학교', | ||
| (7, 'DK', 'EUROPE', 'University of Southern Denmark', 'university_of_southern_denmark', '서던덴마크대학교', | ||
| 'https://www.sdu.dk/en/uddannelse/information_for_international_students/studenthousing', | ||
| 'https://www.sdu.dk/en/uddannelse/exchange_programmes', 'https://www.sdu.dk/en', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_southern_denmark/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_southern_denmark/1.png'), | ||
| (8, 1, 'DK', 'EUROPE', 'IT University of Copenhagen', 'it_university_of_copenhagen', '코펜하겐 IT대학', | ||
| (8, 'DK', 'EUROPE', 'IT University of Copenhagen', 'it_university_of_copenhagen', '코펜하겐 IT대학', | ||
| 'https://en.itu.dk/Programmes/Student-Life/Practical-information-for-international-students', | ||
| 'https://en.itu.dk/Programmes/Exchange-students/Become-an-exchange-student-at-ITU', | ||
| 'https://en.itu.dk/programmes/exchange-students/become-an-exchange-student-at-itu', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/it_university_of_copenhagen/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/it_university_of_copenhagen/1.png'), | ||
| (9, 1, 'DE', 'EUROPE', 'Neu-Ulm University of Applied Sciences', 'neu-ulm_university_of_applied_sciences', | ||
| (9, 'DE', 'EUROPE', 'Neu-Ulm University of Applied Sciences', 'neu-ulm_university_of_applied_sciences', | ||
| '노이울름 대학', | ||
| 'https://www.hnu.de/fileadmin/user_upload/5_Internationales/International_Incomings/Bewerbung/Housing_Broschure.pdf', | ||
| 'https://www.hnu.de/en/international/international-exchange-students/courses-taught-in-english', | ||
| 'https://www.hnu.de/en/international', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/neu-ulm_university_of_applied_sciences/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/neu-ulm_university_of_applied_sciences/1.png'), | ||
| (10, 1, 'GB', 'EUROPE', 'University of Hull', 'university_of_hull', '헐대학', | ||
| (10, 'GB', 'EUROPE', 'University of Hull', 'university_of_hull', '헐대학', | ||
| 'https://www.hull.ac.uk/Choose-Hull/Student-life/Accommodation/accommodation.aspx', | ||
| 'https://universityofhull.app.box.com/s/mpvulz3yz0uijdt68rybce19nek0d8eh', | ||
| 'https://www.hull.ac.uk/choose-hull/study-at-hull/need-to-know/key-dates', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_hull/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_hull/1.png'), | ||
| (11, 1, 'AT', 'EUROPE', 'University of Graz', 'university_of_graz', '그라츠 대학', | ||
| (11, 'AT', 'EUROPE', 'University of Graz', 'university_of_graz', '그라츠 대학', | ||
| 'https://orientation.uni-graz.at/de/planning-the-arrival/accommodation/', | ||
| 'https://static.uni-graz.at/fileadmin/veranstaltungen/orientation/documents/incstud_application-courses.pdf', | ||
| 'https://www.uni-graz.at/en/', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_graz/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_graz/1.png'), | ||
| (12, 1, 'AT', 'EUROPE', 'Graz University of Technology', 'graz_university_of_technology', '그라츠공과대학', | ||
| (12, 'AT', 'EUROPE', 'Graz University of Technology', 'graz_university_of_technology', '그라츠공과대학', | ||
| 'https://www.tugraz.at/en/studying-and-teaching/studying-internationally/incoming-students-exchange-at-tu-graz/your-stay-at-tu-graz/preparation#c75033', | ||
| 'https://tugraz.at/go/search-courses', 'https://www.tugraz.at/en/home', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/graz_university_of_technology/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/graz_university_of_technology/1.png'), | ||
| (13, 1, 'AT', 'EUROPE', 'Catholic Private University Linz', 'catholic_private_university_linz', '린츠 카톨릭 대학교', NULL, | ||
| (13, 'AT', 'EUROPE', 'Catholic Private University Linz', 'catholic_private_university_linz', '린츠 카톨릭 대학교', NULL, | ||
| 'https://ku-linz.at/en/ku_international/incomings/kulis', 'https://ku-linz.at/en', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/catholic_private_university_linz/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/catholic_private_university_linz/1.png'), | ||
| (14, 1, 'AT', 'EUROPE', 'University of Applied Sciences Technikum Wien', | ||
| (14, 'AT', 'EUROPE', 'University of Applied Sciences Technikum Wien', | ||
| 'university_of_applied_sciences_technikum_wien', '빈 공과대학교', NULL, | ||
| 'https://www.technikum-wien.at/en/international/student-mobility/', | ||
| 'https://www.technikum-wien.at/international/studierendenmobilitaet-2/', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_applied_sciences_technikum_wien/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/university_of_applied_sciences_technikum_wien/1.png'), | ||
| (15, 1, 'FR', 'EUROPE', 'IPSA', 'ipsa', 'IPSA', 'https://www.ipsa.fr/en/student-life/pratical-information/', NULL, | ||
| (15, 'FR', 'EUROPE', 'IPSA', 'ipsa', 'IPSA', 'https://www.ipsa.fr/en/student-life/pratical-information/', NULL, | ||
| 'https://www.ipsa.fr/en/engineering-school/aeronautical-space', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/ipsa/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/ipsa/1.png'), | ||
| (16, 1, 'JP', 'ASIA', 'Meiji University', 'meiji_university', '메이지대학', | ||
| (16, 'JP', 'ASIA', 'Meiji University', 'meiji_university', '메이지대학', | ||
| 'https://www.meiji.ac.jp/cip/english/admissions/co7mm90000000461-att/co7mm900000004fa.pdf', NULL, | ||
| 'https://www.meiji.ac.jp/cip/english/admissions/co7mm90000000461-att/co7mm900000004fa.pdf', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/meiji_university/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/meiji_university/1.png'), | ||
| (17, 1, 'JP', 'ASIA', 'BAIKA Women''s University', 'baika_womens_university', '바이카여자대학', | ||
| (17, 'JP', 'ASIA', 'BAIKA Women''s University', 'baika_womens_university', '바이카여자대학', | ||
| 'https://dormy-ac.com/page/baika/', NULL, 'https://www.baika.ac.jp/english/', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/baika_womens_university/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/baika_womens_university/1.png'), | ||
| (18, 1, 'JP', 'ASIA', 'Bunkyo Gakuin University', 'bunkyo_gakuin_university', '분쿄가쿠인대학', NULL, NULL, | ||
| (18, 'JP', 'ASIA', 'Bunkyo Gakuin University', 'bunkyo_gakuin_university', '분쿄가쿠인대학', NULL, NULL, | ||
| 'https://www.bgu.ac.jp/', NULL, | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/bunkyo_gakuin_university/logo.png', | ||
| 'https://solid-connection.s3.ap-northeast-2.amazonaws.com/original/bunkyo_gakuin_university/1.png'); | ||
|
|
||
12 changes: 12 additions & 0 deletions
12
src/main/resources/db/migration/V43__move_home_university_fk_to_univ_apply_info.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| ALTER TABLE host_university | ||
| DROP FOREIGN KEY fk_host_university_home_university; | ||
|
|
||
| ALTER TABLE host_university | ||
| DROP COLUMN home_university_id; | ||
|
|
||
| ALTER TABLE university_info_for_apply | ||
| ADD COLUMN home_university_id BIGINT NULL; | ||
|
|
||
| ALTER TABLE university_info_for_apply | ||
| ADD CONSTRAINT fk_university_info_for_apply_home_university | ||
| FOREIGN KEY (home_university_id) REFERENCES home_university (id) ON DELETE NO ACTION; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1) 데이터 이관 없이 컬럼을 드롭하면 기존 관계가 소실됩니다.
🛠️ 안전한 순서 예시
🤖 Prompt for AI Agents