-- WING-OPS Seed Data: Organizations
-- wing.org 6건
-- 출처: database/init.sql

INSERT INTO wing.org (org_nm, org_abbr_nm, org_tp_cd) VALUES
('해양경찰청',        '해경청',   'HEADQUARTERS'),
('남해지방해양경찰청', '남해청',   'REGIONAL'),
('제주지방해양경찰청', '제주청',   'REGIONAL'),
('여수해양경찰서',    '여수서',   'STATION'),
('서귀포해양경찰서',  '서귀포서', 'STATION'),
('제주해양경찰서',    '제주서',   'STATION');

-- 상위조직 설정 (org_sn은 SERIAL 순서: 1=해경청, 2=남해청, 3=제주청, 4=여수서, 5=서귀포서, 6=제주서)
UPDATE wing.org SET upper_org_sn = 1 WHERE org_sn IN (2, 3);
UPDATE wing.org SET upper_org_sn = 2 WHERE org_sn = 4;
UPDATE wing.org SET upper_org_sn = 3 WHERE org_sn IN (5, 6);
