🗃️ Crew List Unique Index Change

This commit is contained in:
hyojin kim 2026-01-08 15:28:03 +09:00
부모 e1fa48768e
커밋 b842ec8d54
2개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제

파일 보기

@ -24,7 +24,7 @@ public class JsonChangeDetector {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
// List 필드명 // 정렬 기준 복합 (JSON 필드명, 쉼표로 구분) // List 필드명 // 정렬 기준 복합 (JSON 필드명, 쉼표로 구분)
map.put("OwnerHistory", "OwnerCode,EffectiveDate,Sequence"); map.put("OwnerHistory", "OwnerCode,EffectiveDate,Sequence");
map.put("CrewList", "ID"); map.put("CrewList", "LRNO,Shipname,Nationality");
map.put("StowageCommodity", "Sequence,CommodityCode,StowageCode"); map.put("StowageCommodity", "Sequence,CommodityCode,StowageCode");
map.put("GroupBeneficialOwnerHistory", "EffectiveDate,GroupBeneficialOwnerCode,Sequence"); map.put("GroupBeneficialOwnerHistory", "EffectiveDate,GroupBeneficialOwnerCode,Sequence");
map.put("ShipManagerHistory", "EffectiveDate,ShipManagerCode,Sequence"); map.put("ShipManagerHistory", "EffectiveDate,ShipManagerCode,Sequence");

파일 보기

@ -28,12 +28,10 @@ public class ShipDetailSql {
)VALUES( )VALUES(
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
) )
ON CONFLICT (id, lrno) ON CONFLICT (lrno, shipname, nationality)
DO UPDATE SET DO UPDATE SET
datasetversion = EXCLUDED.datasetversion, datasetversion = EXCLUDED.datasetversion,
shipname = EXCLUDED.shipname,
crewlistdate = EXCLUDED.crewlistdate, crewlistdate = EXCLUDED.crewlistdate,
nationality = EXCLUDED.nationality,
totalcrew = EXCLUDED.totalcrew, totalcrew = EXCLUDED.totalcrew,
totalratings = EXCLUDED.totalratings, totalratings = EXCLUDED.totalratings,
totalofficers = EXCLUDED.totalofficers, totalofficers = EXCLUDED.totalofficers,