-- SALES_REQUEST_PART 테이블에 구매리스트 필수 컬럼만 추가
-- 기존: OBJID, PART_OBJID, SALES_REQUEST_MASTER_OBJID, QTY, PARTNER_OBJID, PARTNER_PRICE, WRITER, REGDATE 등

ALTER TABLE SALES_REQUEST_PART
ADD COLUMN IF NOT EXISTS PART_NO VARCHAR(100),              -- 품번 (직접 입력용)
ADD COLUMN IF NOT EXISTS PART_NAME VARCHAR(200),            -- 품명 (직접 입력용)
ADD COLUMN IF NOT EXISTS UNIT_PRICE VARCHAR(50),            -- 단가
ADD COLUMN IF NOT EXISTS TOTAL_PRICE VARCHAR(50),           -- 총단가
ADD COLUMN IF NOT EXISTS PROPOSAL_DATE DATE;                -- 품의서작성일

-- 컬럼 설명
COMMENT ON COLUMN SALES_REQUEST_PART.PART_NO IS '품번';
COMMENT ON COLUMN SALES_REQUEST_PART.PART_NAME IS '품명';
COMMENT ON COLUMN SALES_REQUEST_PART.UNIT_PRICE IS '단가';
COMMENT ON COLUMN SALES_REQUEST_PART.TOTAL_PRICE IS '총단가';
COMMENT ON COLUMN SALES_REQUEST_PART.PROPOSAL_DATE IS '품의서작성일';

