[DB] 오픈 대비 수정
This commit is contained in:
@@ -22,7 +22,7 @@ delete from uri where id in (
|
||||
'uri.admin.settings.adminRoles'
|
||||
);
|
||||
|
||||
-- front_user
|
||||
-- front_user 테이블 : household 로 사용되어 삭제
|
||||
DROP TABLE IF EXISTS front_user_has_upload_file;
|
||||
DROP TABLE IF EXISTS front_user_has_role;
|
||||
DROP TABLE IF EXISTS front_user_social;
|
||||
@@ -33,6 +33,7 @@ DROP SEQUENCE IF EXISTS front_user_has_upload_file_seq;
|
||||
DROP SEQUENCE IF EXISTS front_user_has_role_seq;
|
||||
DROP SEQUENCE IF EXISTS front_user_social_seq ;
|
||||
|
||||
-- 일계부 테이블 : daily_xxx 로 사용되어 삭제
|
||||
DROP TABLE IF EXISTS input_day_group;
|
||||
DROP TABLE IF EXISTS daily_input_status;
|
||||
DROP TABLE IF EXISTS income_expense_record;
|
||||
@@ -51,10 +52,17 @@ DROP SEQUENCE IF EXISTS work_input_seq;
|
||||
DROP SEQUENCE IF EXISTS forestry_self_consumption_seq;
|
||||
DROP SEQUENCE IF EXISTS agriculture_self_consumption_seq;
|
||||
|
||||
-- 샘플 게시판 테이블 : 미사용으로 삭제
|
||||
DROP TABLE IF EXISTS article_has_upload_file ;
|
||||
DROP TABLE IF EXISTS article_comment ;
|
||||
DROP TABLE IF EXISTS article ;
|
||||
|
||||
DROP SEQUENCE IF EXISTS article_comment_seq ;
|
||||
|
||||
-- 이월금(매달 1일, 말일) 테이블 : daily_summary 로 사용되어 삭제
|
||||
DROP TABLE IF EXISTS monthly_carryover;
|
||||
|
||||
|
||||
DROP SEQUENCE IF EXISTS monthly_carryover_seq;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ DROP TABLE IF EXISTS suggestion;
|
||||
DROP TABLE IF EXISTS upload_receipt_files;
|
||||
DROP TABLE IF EXISTS forest_product_yield;
|
||||
DROP TABLE IF EXISTS forest_product;
|
||||
DROP TABLE IF EXISTS monthly_carryover;
|
||||
|
||||
DROP TABLE IF EXISTS bank_auto_transfer;
|
||||
DROP TABLE IF EXISTS monthly_input_status;
|
||||
@@ -84,7 +83,6 @@ DROP SEQUENCE IF EXISTS research_area_seq;
|
||||
DROP SEQUENCE IF EXISTS upload_receipt_files_seq;
|
||||
DROP SEQUENCE IF EXISTS forest_product_yield_seq;
|
||||
DROP SEQUENCE IF EXISTS forest_product_seq;
|
||||
DROP SEQUENCE IF EXISTS monthly_carryover_seq;
|
||||
|
||||
|
||||
DROP SEQUENCE IF EXISTS bank_auto_transfer_seq;
|
||||
|
||||
@@ -1016,46 +1016,6 @@ COMMENT ON COLUMN bank_auto_transfer.transfer_category_code IS '이체 카테고
|
||||
COMMENT ON COLUMN bank_auto_transfer.unit IS '단위(직접입력)';
|
||||
COMMENT ON COLUMN bank_auto_transfer.category IS '카테고리';
|
||||
|
||||
-- 6. monthly_carryover
|
||||
-- ============================================
|
||||
-- TABLE : monthly_carryover
|
||||
-- DESC : 이월금(매달 1일, 말일) 테이블
|
||||
-- ============================================
|
||||
CREATE SEQUENCE monthly_carryover_seq START WITH 1 INCREMENT BY 1 CACHE 1 NO CYCLE;
|
||||
|
||||
CREATE TABLE monthly_carryover (
|
||||
id bigint DEFAULT nextval('monthly_carryover_seq') NOT NULL, -- 이월금 ID
|
||||
household_seq bigint NOT NULL, -- 임가정보 일련번호 (FK)
|
||||
month varchar(7) NOT NULL, -- 조사시행 월 (yyyy-mm)
|
||||
start_price integer, -- 월초이월금(현금)
|
||||
end_price integer, -- 월말현금
|
||||
created_at timestamp(6) NOT NULL, -- 생성일
|
||||
created_by varchar(255) NOT NULL, -- 생성자
|
||||
updated_at timestamp(6) NOT NULL, -- 수정일
|
||||
updated_by varchar(255) NOT NULL, -- 수정자
|
||||
deleted_at timestamp(6), -- 삭제일
|
||||
deleted_by varchar(255), -- 삭제자
|
||||
is_deleted boolean DEFAULT false, -- 삭제여부
|
||||
|
||||
CONSTRAINT monthly_carryover_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_monthly_carryover__household FOREIGN KEY (household_seq) REFERENCES household(seq)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE monthly_carryover IS '이월금(매달 1일, 말일)';
|
||||
|
||||
COMMENT ON COLUMN monthly_carryover.id IS '이월금 ID';
|
||||
COMMENT ON COLUMN monthly_carryover.household_seq IS '임가정보 일련번호';
|
||||
COMMENT ON COLUMN monthly_carryover.month IS '조사시행 월 (yyyy-mm)';
|
||||
COMMENT ON COLUMN monthly_carryover.start_price IS '월초이월금(현금)';
|
||||
COMMENT ON COLUMN monthly_carryover.end_price IS '월말현금';
|
||||
COMMENT ON COLUMN monthly_carryover.created_at IS '생성일';
|
||||
COMMENT ON COLUMN monthly_carryover.created_by IS '생성자';
|
||||
COMMENT ON COLUMN monthly_carryover.updated_at IS '수정일';
|
||||
COMMENT ON COLUMN monthly_carryover.updated_by IS '수정자';
|
||||
COMMENT ON COLUMN monthly_carryover.deleted_at IS '삭제일';
|
||||
COMMENT ON COLUMN monthly_carryover.deleted_by IS '삭제자';
|
||||
COMMENT ON COLUMN monthly_carryover.is_deleted IS '삭제여부';
|
||||
|
||||
|
||||
-- 12. upload_receipt_files
|
||||
-- ============================================
|
||||
|
||||
Reference in New Issue
Block a user