Split the function

This commit is contained in:
2026-02-09 18:29:35 +09:00
parent 48369486a3
commit d0a6b88eba
14 changed files with 953 additions and 9 deletions

View File

@@ -23,3 +23,36 @@ COMMENT ON COLUMN public.batch_history.created_dttm IS '생성 일시';
COMMENT ON COLUMN public.batch_history.updated_dttm IS '수정 일시';
COMMENT ON COLUMN public.batch_history.status IS '상태 (STARTED/COMPLETED/FAILED)';
COMMENT ON COLUMN public.batch_history.completed_dttm IS '완료 일시';
-- batch_step_history 테이블 생성
CREATE TABLE IF NOT EXISTS public.batch_step_history (
id BIGSERIAL PRIMARY KEY,
anal_uid BIGINT NOT NULL,
result_uid VARCHAR(255) NOT NULL,
step_name VARCHAR(100) NOT NULL,
status VARCHAR(50) NOT NULL,
error_message TEXT,
started_dttm TIMESTAMP NOT NULL,
completed_dttm TIMESTAMP,
created_dttm TIMESTAMP NOT NULL,
updated_dttm TIMESTAMP NOT NULL
);
-- 인덱스 생성
CREATE INDEX IF NOT EXISTS idx_batch_step_history_anal_uid ON public.batch_step_history(anal_uid);
CREATE INDEX IF NOT EXISTS idx_batch_step_history_result_uid ON public.batch_step_history(result_uid);
CREATE INDEX IF NOT EXISTS idx_batch_step_history_status ON public.batch_step_history(status);
CREATE INDEX IF NOT EXISTS idx_batch_step_history_step_name ON public.batch_step_history(step_name);
-- 코멘트
COMMENT ON TABLE public.batch_step_history IS '배치 Step 실행 이력';
COMMENT ON COLUMN public.batch_step_history.id IS 'Step 이력 고유 ID';
COMMENT ON COLUMN public.batch_step_history.anal_uid IS '분석 UID';
COMMENT ON COLUMN public.batch_step_history.result_uid IS '결과 UID';
COMMENT ON COLUMN public.batch_step_history.step_name IS 'Step 이름 (makeGeoJsonStep/dockerRunStep/zipResponseStep)';
COMMENT ON COLUMN public.batch_step_history.status IS '상태 (STARTED/SUCCESS/FAILED)';
COMMENT ON COLUMN public.batch_step_history.error_message IS '에러 메시지';
COMMENT ON COLUMN public.batch_step_history.started_dttm IS 'Step 시작 일시';
COMMENT ON COLUMN public.batch_step_history.completed_dttm IS 'Step 완료 일시';
COMMENT ON COLUMN public.batch_step_history.created_dttm IS '생성 일시';
COMMENT ON COLUMN public.batch_step_history.updated_dttm IS '수정 일시';