개인정보 변경 동의 이력 쌓기

This commit is contained in:
주수현
2025-07-15 09:40:50 +09:00
parent f4d2c59889
commit c9b5851176
12 changed files with 162 additions and 5 deletions

View File

@@ -593,4 +593,27 @@ AS SELECT a.seq,
LEFT JOIN researcher_has_household rhh ON rhh.admin_seq = a.seq AND rhh.is_deleted = false
LEFT JOIN household h ON h.seq = rhh.household_seq AND h.is_panel IS TRUE AND h.is_deleted = false
WHERE ahr.role_id::text = 'ROLE_RESEARCHER'::text
GROUP BY a.seq, a.id, a.name, a.phone, a.account_disabled;
GROUP BY a.seq, a.id, a.name, a.phone, a.account_disabled;
-- ============================================
-- 개인정보 변경 동의 내역
-- ============================================
-- public.term_agreement
CREATE SEQUENCE public.term_agreement_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1
NO CYCLE;
CREATE TABLE public.term_agreement (
id int8 DEFAULT nextval('term_agreement_seq'::regclass) NOT NULL,
seq int8 not NULL,
"type" varchar(10) NULL,
previous_data varchar(10) NULL,
created_at timestamp(6) NULL,
created_by varchar(255) null,
CONSTRAINT term_agreement_pkey PRIMARY KEY (id)
);