[ Refactor ] - 서비스 내부 FK에 ON DELETE CASCADE 적용 - #198
Merged
Conversation
- work-service: JOBPLATFORMMAPPING/JOB_SCHEDULE/WORK_LOG/SETTLEMENT/ALLOCATION_GOAL → JOB, WORK_LOG_PLATFORM_INCOME → WORK_LOG FK에 CASCADE 적용 - work-service: CATEGORY/PLATFORM을 부모로 하는 FK(JOB, PLATFORM, JOBPLATFORMMAPPING, WORK_LOG_PLATFORM_INCOME)는 마스터 데이터 보호를 위해 RESTRICT 유지 - account-service: ACCOUNT→CODEF_CONNECTION, ACCOUNT_TRANSACTION→ACCOUNT, ACCOUNT_SYNC_STATE→CODEF_CONNECTION, TXN_ANALYSIS→ACCOUNT_TRANSACTION FK에 CASCADE 적용 - payment-service: PAYMENT→SUBSCRIPTION FK에 CASCADE 적용
hanjyoon01
requested review from
KSBoscoKim,
Kimd0ng,
SOOsuhyuncho,
bigwaveBigwave and
shinh09
August 20, 2026 07:52
KSBoscoKim
approved these changes
Aug 20, 2026
shinh09
approved these changes
Aug 20, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
관련 이슈
작업 사항
work-service: JOBPLATFORMMAPPING/JOB_SCHEDULE/WORK_LOG/SETTLEMENT/ALLOCATION_GOAL → JOB, WORK_LOG_PLATFORM_INCOME → WORK_LOG FK에 ON DELETE CASCADE 적용work-service: CATEGORY/PLATFORM을 부모로 하는 FK(JOB→CATEGORY, PLATFORM→CATEGORY, JOBPLATFORMMAPPING→PLATFORM, WORK_LOG_PLATFORM_INCOME→PLATFORM)는 마스터 데이터라 CASCADE 미적용, 기존 RESTRICT 유지account-service: ACCOUNT→CODEF_CONNECTION, ACCOUNT_TRANSACTION→ACCOUNT, ACCOUNT_SYNC_STATE→CODEF_CONNECTION, TXN_ANALYSIS→ACCOUNT_TRANSACTION FK에 ON DELETE CASCADE 적용payment-service: PAYMENT→SUBSCRIPTION FK에 ON DELETE CASCADE 적용참고 사항
AccountSchemaContractTest.schemaUsesForeignKeysOnlyInsideAccountService()는.contains()부분 문자열 검사라 CASCADE 추가에 영향받지 않음, 테스트 수정 불필요*-schema.sql)만 수정했고 신규 환경에서 재실행 시에만 반영됨 — 이미 생성된 로컬/스테이징 DB는 별도로ALTER TABLE ... DROP FOREIGN KEY후 재생성 필요