infra: 운영 서버를 121.156.99.3 으로 이관 — SSH/DB host-internal 통합
Deploy momo-erp / deploy (push) Failing after 14m33s
Deploy momo-erp / deploy (push) Failing after 14m33s
- .gitea/workflows/deploy.yml: SSH 대상 121.156.99.3, sshpass 갱신
+ .env.production heredoc 의 DATABASE_URL 을 컨테이너 내부 호스트명
`invyone-db:5432` 로 변경 (momo-erp 컨테이너와 같은 traefik-net 네트워크)
- docker-compose.prod.yml / README.md / CICD_SETUP.md: 서버 IP 일괄 갱신
- 부속 정리: stale 한 운영 문서 xlsx 들 제거 (실제 운영과 무관, working tree 정돈)
이제 main push 시 새 IDC 서버로 자동배포되며, DB 연결은 같은 호스트 내
컨테이너 네트워크로 직결 (외부 5432 우회 안 함).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -17,12 +17,12 @@ jobs:
|
||||
- name: Deploy via SSH (password auth)
|
||||
run: |
|
||||
set -e # 배포 단계 실패하면 즉시 워크플로우 fail (헬스체크에 의존하지 않음)
|
||||
export SSHPASS='qlalfqjsgh11'
|
||||
export SSHPASS='1313Qkrckd!!!!!!'
|
||||
mkdir -p ~/.ssh
|
||||
ssh-keyscan -H 183.99.177.40 >> ~/.ssh/known_hosts 2>/dev/null || true
|
||||
ssh-keyscan -H 121.156.99.3 >> ~/.ssh/known_hosts 2>/dev/null || true
|
||||
|
||||
sshpass -e ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
|
||||
chpark@183.99.177.40 'bash -s' <<'REMOTE_SCRIPT'
|
||||
chpark@121.156.99.3 'bash -s' <<'REMOTE_SCRIPT'
|
||||
set -e # 원격 명령도 fail 즉시 중단
|
||||
DEPLOY_DIR="$HOME/momo-erp/source"
|
||||
mkdir -p "$HOME/momo-erp"
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
|
||||
# .env.production 갱신 (SMTP/MOMO 포함)
|
||||
cat > .env.production <<'ENVEOF'
|
||||
DATABASE_URL=postgresql://momo_app:qlalfqjsgh11@121.156.99.3:5432/distribution
|
||||
DATABASE_URL=postgresql://momo_app:qlalfqjsgh11@invyone-db:5432/distribution
|
||||
NEXTAUTH_URL=https://momotogether.com
|
||||
NEXTAUTH_SECRET=2b1f94cca798f49ff62822b01617503b019d118df9d249ee61f835a7dca1946e
|
||||
NEXT_PUBLIC_APP_NAME=유통관리 ERP
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
## 개요
|
||||
|
||||
`.gitea/workflows/deploy.yml` 워크플로가 `main` 브랜치 푸시 시 자동으로
|
||||
배포 서버(183.99.177.40)에 SSH 접속 → `docker compose up -d --build` 실행합니다.
|
||||
배포 서버(121.156.99.3)에 SSH 접속 → `docker compose up -d --build` 실행합니다.
|
||||
|
||||
## Gitea 시크릿 등록
|
||||
|
||||
@@ -11,7 +11,7 @@ Gitea 저장소 → **Settings → Actions → Secrets** 에 다음 시크릿을
|
||||
|
||||
| 시크릿 이름 | 값 (예시) |
|
||||
|-------------|----------|
|
||||
| `DEPLOY_HOST` | `183.99.177.40` |
|
||||
| `DEPLOY_HOST` | `121.156.99.3` |
|
||||
| `DEPLOY_USER` | `chpark` |
|
||||
| `DEPLOY_SSH_KEY` | SSH 개인키 전체 (BEGIN/END 포함) |
|
||||
| `DATABASE_URL` | `postgresql://momo_app:qlalfqjsgh11@121.156.99.3:5432/distribution` |
|
||||
@@ -26,7 +26,7 @@ Gitea 저장소 → **Settings → Actions → Secrets** 에 다음 시크릿을
|
||||
```bash
|
||||
ssh-keygen -t ed25519 -C "gitea-deploy" -f ~/.ssh/momo_deploy -N ""
|
||||
# 공개키를 배포 서버에 등록
|
||||
ssh-copy-id -i ~/.ssh/momo_deploy.pub chpark@183.99.177.40
|
||||
ssh-copy-id -i ~/.ssh/momo_deploy.pub chpark@121.156.99.3
|
||||
# 개인키를 Gitea Secret `DEPLOY_SSH_KEY` 에 붙여넣기
|
||||
cat ~/.ssh/momo_deploy
|
||||
```
|
||||
@@ -41,7 +41,7 @@ cat ~/.ssh/momo_deploy
|
||||
|
||||
긴급 시:
|
||||
```bash
|
||||
ssh chpark@183.99.177.40
|
||||
ssh chpark@121.156.99.3
|
||||
cd ~/momo-erp/source
|
||||
git pull
|
||||
docker compose -f docker-compose.prod.yml up -d --build
|
||||
|
||||
@@ -133,7 +133,7 @@ npm run lint
|
||||
|
||||
`main` 브랜치에 push 하면 [`.gitea/workflows/deploy.yml`](.gitea/workflows/deploy.yml) 이 자동 실행되어 운영 서버에서 `git pull → docker compose build → up -d` 까지 수행.
|
||||
|
||||
- 운영 서버: `183.99.177.40` (SSH, chpark)
|
||||
- 운영 서버: `121.156.99.3` (SSH, chpark)
|
||||
- Compose 파일: [`docker-compose.prod.yml`](docker-compose.prod.yml)
|
||||
- 컨테이너명: `momo-erp` / 이미지: `momo-erp:latest`
|
||||
- 리버스 프록시: Traefik (`traefik-net` 외부 네트워크, Let's Encrypt 자동발급)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 운영 배포 (Traefik + momotogether.com)
|
||||
# 대상 서버: 183.99.177.40 (Traefik v2.11 외부 네트워크 traefik-net 사용)
|
||||
# 대상 서버: 121.156.99.3 (Traefik v2.11 외부 네트워크 traefik-net 사용)
|
||||
# 사용: docker compose -f docker-compose.prod.yml up -d --build
|
||||
services:
|
||||
momo-erp:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,774 +0,0 @@
|
||||
-- Create table
|
||||
create table ORDER_MGMT
|
||||
(
|
||||
order_mgmt_objid NUMBER not null,
|
||||
region_cd VARCHAR2(15),
|
||||
customer_cd VARCHAR2(15),
|
||||
order_title VARCHAR2(200),
|
||||
order_cd VARCHAR2(15),
|
||||
del_date VARCHAR2(8),
|
||||
plant_cd VARCHAR2(15),
|
||||
req_date VARCHAR2(8),
|
||||
reason VARCHAR2(4000),
|
||||
result_cd VARCHAR2(15),
|
||||
project_no VARCHAR2(50),
|
||||
order_price VARCHAR2(20),
|
||||
design_pm VARCHAR2(20),
|
||||
production_pm VARCHAR2(20),
|
||||
electro_pm VARCHAR2(20),
|
||||
se_pm VARCHAR2(20),
|
||||
manager_pm VARCHAR2(20),
|
||||
reg_id VARCHAR2(20),
|
||||
reg_date DATE
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table ORDER_MGMT
|
||||
is '영업활동등록';
|
||||
-- Add comments to the columns
|
||||
comment on column ORDER_MGMT.order_mgmt_objid
|
||||
is '영업활동등록OBJID';
|
||||
comment on column ORDER_MGMT.region_cd
|
||||
is '지역';
|
||||
comment on column ORDER_MGMT.customer_cd
|
||||
is '고객사';
|
||||
comment on column ORDER_MGMT.order_title
|
||||
is '수주명';
|
||||
comment on column ORDER_MGMT.order_cd
|
||||
is '수주ITEM코드';
|
||||
comment on column ORDER_MGMT.del_date
|
||||
is '납기일';
|
||||
comment on column ORDER_MGMT.plant_cd
|
||||
is '공장코드';
|
||||
comment on column ORDER_MGMT.req_date
|
||||
is '견적요청일';
|
||||
comment on column ORDER_MGMT.reason
|
||||
is '특이사항';
|
||||
comment on column ORDER_MGMT.result_cd
|
||||
is '수주결과';
|
||||
comment on column ORDER_MGMT.project_no
|
||||
is '프로젝트NO';
|
||||
comment on column ORDER_MGMT.order_price
|
||||
is '수주가(억원)';
|
||||
comment on column ORDER_MGMT.design_pm
|
||||
is '설계_PM';
|
||||
comment on column ORDER_MGMT.production_pm
|
||||
is '생산_PM';
|
||||
comment on column ORDER_MGMT.electro_pm
|
||||
is '전장_PM';
|
||||
comment on column ORDER_MGMT.se_pm
|
||||
is 'SE_PM';
|
||||
comment on column ORDER_MGMT.manager_pm
|
||||
is '설계총괄PM';
|
||||
comment on column ORDER_MGMT.reg_id
|
||||
is '등록자';
|
||||
comment on column ORDER_MGMT.reg_date
|
||||
is '등록일';
|
||||
-- Create/Recreate primary, unique and foreign key constraints
|
||||
alter table ORDER_MGMT
|
||||
add constraint ORDER_MGMT_PK primary key (ORDER_MGMT_OBJID)
|
||||
using index
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
|
||||
|
||||
-- Create table
|
||||
create table PROJECT_MGMT
|
||||
(
|
||||
project_mgmt_objid NUMBER not null,
|
||||
order_mgmt_objid NUMBER not null,
|
||||
region_cd VARCHAR2(15),
|
||||
customer_cd VARCHAR2(15),
|
||||
order_cd VARCHAR2(15),
|
||||
project_title VARCHAR2(200),
|
||||
del_date VARCHAR2(8),
|
||||
plant_cd VARCHAR2(15),
|
||||
manager_pm VARCHAR2(20),
|
||||
reg_id VARCHAR2(20),
|
||||
reg_date DATE
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table PROJECT_MGMT
|
||||
is '프로젝트진행현황';
|
||||
-- Add comments to the columns
|
||||
comment on column PROJECT_MGMT.project_mgmt_objid
|
||||
is '프로젝트OBJID';
|
||||
comment on column PROJECT_MGMT.order_mgmt_objid
|
||||
is '영업등록OBJID';
|
||||
comment on column PROJECT_MGMT.region_cd
|
||||
is '지역';
|
||||
comment on column PROJECT_MGMT.customer_cd
|
||||
is '고객사';
|
||||
comment on column PROJECT_MGMT.order_cd
|
||||
is '수주ITEM코드';
|
||||
comment on column PROJECT_MGMT.project_title
|
||||
is '프로젝트TITLE';
|
||||
comment on column PROJECT_MGMT.del_date
|
||||
is '납기일';
|
||||
comment on column PROJECT_MGMT.plant_cd
|
||||
is '공장코드';
|
||||
comment on column PROJECT_MGMT.manager_pm
|
||||
is '설계총괄PM';
|
||||
comment on column PROJECT_MGMT.reg_id
|
||||
is '등록자';
|
||||
comment on column PROJECT_MGMT.reg_date
|
||||
is '등록일';
|
||||
-- Create/Recreate primary, unique and foreign key constraints
|
||||
alter table PROJECT_MGMT
|
||||
add constraint PROJECT_MGMT_PK primary key (PROJECT_MGMT_OBJID)
|
||||
using index
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
|
||||
|
||||
-- Create table
|
||||
create table PART_MGMT
|
||||
(
|
||||
part_mgmt_objid NUMBER not null,
|
||||
part_mgmt_parent_objid NUMBER,
|
||||
project_mgmt_objid NUMBER not null,
|
||||
part_level VARCHAR2(10),
|
||||
part_name VARCHAR2(100),
|
||||
part_no VARCHAR2(100) not null,
|
||||
parent_part_no VARCHAR2(100),
|
||||
spec_cd VARCHAR2(100),
|
||||
mfa_cd VARCHAR2(100),
|
||||
qty VARCHAR2(10),
|
||||
process_cd VARCHAR2(100),
|
||||
sort_cd VARCHAR2(100),
|
||||
sup_cd VARCHAR2(100),
|
||||
rev VARCHAR2(10) not null,
|
||||
rel_date DATE,
|
||||
reg_date DATE,
|
||||
reg_user_id VARCHAR2(20)
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table PART_MGMT
|
||||
is '설계관리';
|
||||
-- Add comments to the columns
|
||||
comment on column PART_MGMT.part_mgmt_objid
|
||||
is 'OBJID';
|
||||
comment on column PART_MGMT.project_mgmt_objid
|
||||
is 'PROJECT_OBJID';
|
||||
comment on column PART_MGMT.part_level
|
||||
is 'PART LEVEL';
|
||||
comment on column PART_MGMT.part_name
|
||||
is '품목명';
|
||||
comment on column PART_MGMT.part_no
|
||||
is '품번';
|
||||
comment on column PART_MGMT.parent_part_no
|
||||
is '모품';
|
||||
comment on column PART_MGMT.spec_cd
|
||||
is '규격';
|
||||
comment on column PART_MGMT.mfa_cd
|
||||
is '제조사';
|
||||
comment on column PART_MGMT.qty
|
||||
is '수량';
|
||||
comment on column PART_MGMT.process_cd
|
||||
is '후처리';
|
||||
comment on column PART_MGMT.sort_cd
|
||||
is '부품구분';
|
||||
comment on column PART_MGMT.sup_cd
|
||||
is '공급업체';
|
||||
comment on column PART_MGMT.rev
|
||||
is '리비전';
|
||||
comment on column PART_MGMT.rel_date
|
||||
is '배포일';
|
||||
comment on column PART_MGMT.reg_date
|
||||
is '등록일';
|
||||
comment on column PART_MGMT.reg_user_id
|
||||
is '등록';
|
||||
-- Create/Recreate primary, unique and foreign key constraints
|
||||
alter table PART_MGMT
|
||||
add constraint PART_NO_PK primary key (PART_NO, REV)
|
||||
using index
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
|
||||
|
||||
|
||||
-- Create table
|
||||
create table MATERIAL_MGMT
|
||||
(
|
||||
material_mgmt_objid NUMBER not null,
|
||||
project_mgmt_objid NUMBER not null,
|
||||
part_level VARCHAR2(10),
|
||||
part_name VARCHAR2(100),
|
||||
part_no VARCHAR2(100) not null,
|
||||
spec_cd VARCHAR2(100),
|
||||
mfa_cd VARCHAR2(100),
|
||||
qty VARCHAR2(10),
|
||||
process_cd VARCHAR2(100),
|
||||
sort_cd VARCHAR2(100),
|
||||
sup_cd VARCHAR2(100),
|
||||
rev VARCHAR2(10) not null,
|
||||
rel_date DATE,
|
||||
unit_price VARCHAR2(20),
|
||||
supply_amount VARCHAR2(20),
|
||||
req_date VARCHAR2(10),
|
||||
rec_date VARCHAR2(10),
|
||||
receive_qty VARCHAR2(10),
|
||||
acq_user_id VARCHAR2(20),
|
||||
acq_date VARCHAR2(10),
|
||||
acq_qty VARCHAR2(10),
|
||||
cur_user_id VARCHAR2(20),
|
||||
status_cd VARCHAR2(20),
|
||||
reg_date DATE,
|
||||
reg_user_id VARCHAR2(20)
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table MATERIAL_MGMT
|
||||
is '자재관리(발주관리)';
|
||||
-- Add comments to the columns
|
||||
comment on column MATERIAL_MGMT.material_mgmt_objid
|
||||
is 'OBJID';
|
||||
comment on column MATERIAL_MGMT.project_mgmt_objid
|
||||
is 'PROJECT_OBJID';
|
||||
comment on column MATERIAL_MGMT.part_level
|
||||
is 'PART LEVEL';
|
||||
comment on column MATERIAL_MGMT.part_name
|
||||
is '품목명';
|
||||
comment on column MATERIAL_MGMT.part_no
|
||||
is '품번';
|
||||
comment on column MATERIAL_MGMT.spec_cd
|
||||
is '규격';
|
||||
comment on column MATERIAL_MGMT.mfa_cd
|
||||
is '제조사';
|
||||
comment on column MATERIAL_MGMT.qty
|
||||
is '수량';
|
||||
comment on column MATERIAL_MGMT.process_cd
|
||||
is '후처리';
|
||||
comment on column MATERIAL_MGMT.sort_cd
|
||||
is '부품구분';
|
||||
comment on column MATERIAL_MGMT.sup_cd
|
||||
is '공급업체';
|
||||
comment on column MATERIAL_MGMT.rev
|
||||
is '리비전';
|
||||
comment on column MATERIAL_MGMT.rel_date
|
||||
is '배포일';
|
||||
comment on column MATERIAL_MGMT.unit_price
|
||||
is '단가';
|
||||
comment on column MATERIAL_MGMT.supply_amount
|
||||
is '공급금랙';
|
||||
comment on column MATERIAL_MGMT.req_date
|
||||
is '입고요청일';
|
||||
comment on column MATERIAL_MGMT.rec_date
|
||||
is '입고일';
|
||||
comment on column MATERIAL_MGMT.receive_qty
|
||||
is '입고수량';
|
||||
comment on column MATERIAL_MGMT.acq_user_id
|
||||
is '인수자';
|
||||
comment on column MATERIAL_MGMT.acq_date
|
||||
is '인수일';
|
||||
comment on column MATERIAL_MGMT.acq_qty
|
||||
is '인수수량';
|
||||
comment on column MATERIAL_MGMT.cur_user_id
|
||||
is '현재처리자';
|
||||
comment on column MATERIAL_MGMT.status_cd
|
||||
is '상태';
|
||||
comment on column MATERIAL_MGMT.reg_date
|
||||
is '등록일';
|
||||
comment on column MATERIAL_MGMT.reg_user_id
|
||||
is '등록';
|
||||
-- Create/Recreate primary, unique and foreign key constraints
|
||||
alter table MATERIAL_MGMT
|
||||
add constraint MATERIAL_MGMT_PK primary key (PROJECT_MGMT_OBJID, PART_NO, REV)
|
||||
using index
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
|
||||
|
||||
-- Create table
|
||||
create table INVENTORY_MGMT
|
||||
(
|
||||
inventory_mgmt_objid NUMBER not null,
|
||||
project_mgmt_objid NUMBER not null,
|
||||
part_name VARCHAR2(100),
|
||||
part_no VARCHAR2(100),
|
||||
spec_cd VARCHAR2(100),
|
||||
mfa_cd VARCHAR2(100),
|
||||
qty VARCHAR2(10),
|
||||
unit_price VARCHAR2(20),
|
||||
dept_cd VARCHAR2(20),
|
||||
reg_date VARCHAR2(10),
|
||||
inv_cd VARCHAR2(20),
|
||||
inv_rea_cd VARCHAR2(20),
|
||||
inv_pur_cd VARCHAR2(20),
|
||||
inv_loc_cd VARCHAR2(20),
|
||||
reg_user_id VARCHAR2(20)
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table INVENTORY_MGMT
|
||||
is '재고관리';
|
||||
-- Add comments to the columns
|
||||
comment on column INVENTORY_MGMT.inventory_mgmt_objid
|
||||
is 'OBJID';
|
||||
comment on column INVENTORY_MGMT.project_mgmt_objid
|
||||
is 'PROJECT_OBJID';
|
||||
comment on column INVENTORY_MGMT.part_name
|
||||
is '품목명';
|
||||
comment on column INVENTORY_MGMT.part_no
|
||||
is '품번';
|
||||
comment on column INVENTORY_MGMT.spec_cd
|
||||
is '규격';
|
||||
comment on column INVENTORY_MGMT.mfa_cd
|
||||
is '제조사';
|
||||
comment on column INVENTORY_MGMT.qty
|
||||
is '수량';
|
||||
comment on column INVENTORY_MGMT.unit_price
|
||||
is '단가';
|
||||
comment on column INVENTORY_MGMT.dept_cd
|
||||
is '팀명';
|
||||
comment on column INVENTORY_MGMT.reg_date
|
||||
is '등록일';
|
||||
comment on column INVENTORY_MGMT.inv_cd
|
||||
is '재고구분';
|
||||
comment on column INVENTORY_MGMT.inv_rea_cd
|
||||
is '사유';
|
||||
comment on column INVENTORY_MGMT.inv_pur_cd
|
||||
is '구매구분';
|
||||
comment on column INVENTORY_MGMT.inv_loc_cd
|
||||
is '위치';
|
||||
comment on column INVENTORY_MGMT.reg_user_id
|
||||
is '등록';
|
||||
|
||||
|
||||
-- Create table
|
||||
create table MATERIAL_RELEASE
|
||||
(
|
||||
material_release_objid NUMBER not null,
|
||||
inventory_mgmt_objid NUMBER not null,
|
||||
project_mgmt_objid NUMBER not null,
|
||||
rel_qty VARCHAR2(20),
|
||||
rel_pur_cd VARCHAR2(20),
|
||||
rel_date VARCHAR2(10),
|
||||
rel_user_id VARCHAR2(20),
|
||||
reg_date DATE,
|
||||
reg_user_id VARCHAR2(20)
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table MATERIAL_RELEASE
|
||||
is '자재불출';
|
||||
-- Add comments to the columns
|
||||
comment on column MATERIAL_RELEASE.material_release_objid
|
||||
is 'OBJID';
|
||||
comment on column MATERIAL_RELEASE.inventory_mgmt_objid
|
||||
is '재고관리OBJID';
|
||||
comment on column MATERIAL_RELEASE.project_mgmt_objid
|
||||
is 'PROJECT_OBJID';
|
||||
comment on column MATERIAL_RELEASE.rel_qty
|
||||
is '불출수량';
|
||||
comment on column MATERIAL_RELEASE.rel_pur_cd
|
||||
is '용도';
|
||||
comment on column MATERIAL_RELEASE.rel_date
|
||||
is '불출일';
|
||||
comment on column MATERIAL_RELEASE.rel_user_id
|
||||
is '인수자';
|
||||
comment on column MATERIAL_RELEASE.reg_date
|
||||
is '등록일';
|
||||
comment on column MATERIAL_RELEASE.reg_user_id
|
||||
is '등록';
|
||||
|
||||
|
||||
-- Create table
|
||||
create table TIME_SHEET
|
||||
(
|
||||
objid NUMBER not null,
|
||||
project_mgmt_objid NUMBER,
|
||||
work_date VARCHAR2(10),
|
||||
reg_user_id VARCHAR2(20),
|
||||
bus_cd VARCHAR2(100),
|
||||
title VARCHAR2(500),
|
||||
trip_cd VARCHAR2(100),
|
||||
company_cd VARCHAR2(100),
|
||||
work_time VARCHAR2(10),
|
||||
reg_date DATE
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table TIME_SHEET
|
||||
is 'Time Sheet 관리';
|
||||
-- Add comments to the columns
|
||||
comment on column TIME_SHEET.objid
|
||||
is 'OBJID';
|
||||
comment on column TIME_SHEET.project_mgmt_objid
|
||||
is '프로젝트 OBJID';
|
||||
comment on column TIME_SHEET.work_date
|
||||
is '날짜';
|
||||
comment on column TIME_SHEET.reg_user_id
|
||||
is '등록자';
|
||||
comment on column TIME_SHEET.bus_cd
|
||||
is '업무구분';
|
||||
comment on column TIME_SHEET.title
|
||||
is '상세내용';
|
||||
comment on column TIME_SHEET.trip_cd
|
||||
is '출장지';
|
||||
comment on column TIME_SHEET.company_cd
|
||||
is '업체명';
|
||||
comment on column TIME_SHEET.work_time
|
||||
is '근무시간';
|
||||
comment on column TIME_SHEET.reg_date
|
||||
is '등록';
|
||||
|
||||
|
||||
|
||||
-- Create table
|
||||
create table EXPENSE_MASTER
|
||||
(
|
||||
expense_master_objid NUMBER not null,
|
||||
project_mgmt_objid NUMBER not null,
|
||||
expense_id VARCHAR2(20) not null,
|
||||
bns_start_date VARCHAR2(10),
|
||||
bns_end_date VARCHAR2(10),
|
||||
exp_status_cd VARCHAR2(20),
|
||||
exp_company_cd VARCHAR2(20),
|
||||
exp_area_cd VARCHAR2(20),
|
||||
vehicel_used VARCHAR2(100),
|
||||
bus_users_id VARCHAR2(100),
|
||||
bus_content VARCHAR2(1000),
|
||||
bus_title VARCHAR2(1000),
|
||||
reason VARCHAR2(4000),
|
||||
instructions VARCHAR2(4000),
|
||||
reg_user_id VARCHAR2(20),
|
||||
reg_date VARCHAR2(10)
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table EXPENSE_MASTER
|
||||
is '경비청구마스터';
|
||||
-- Add comments to the columns
|
||||
comment on column EXPENSE_MASTER.expense_master_objid
|
||||
is 'OBJID';
|
||||
comment on column EXPENSE_MASTER.project_mgmt_objid
|
||||
is '프로젝트 OBJID';
|
||||
comment on column EXPENSE_MASTER.expense_id
|
||||
is '신청번호';
|
||||
comment on column EXPENSE_MASTER.bns_start_date
|
||||
is '출장시작일';
|
||||
comment on column EXPENSE_MASTER.bns_end_date
|
||||
is '출장종료일';
|
||||
comment on column EXPENSE_MASTER.exp_status_cd
|
||||
is '단계';
|
||||
comment on column EXPENSE_MASTER.exp_company_cd
|
||||
is '업체';
|
||||
comment on column EXPENSE_MASTER.exp_area_cd
|
||||
is '지역';
|
||||
comment on column EXPENSE_MASTER.vehicel_used
|
||||
is '이용차량';
|
||||
comment on column EXPENSE_MASTER.bus_users_id
|
||||
is '출장자';
|
||||
comment on column EXPENSE_MASTER.bus_content
|
||||
is '출장목적';
|
||||
comment on column EXPENSE_MASTER.bus_title
|
||||
is '제목';
|
||||
comment on column EXPENSE_MASTER.reason
|
||||
is '특이사항';
|
||||
comment on column EXPENSE_MASTER.instructions
|
||||
is '지시사항';
|
||||
comment on column EXPENSE_MASTER.reg_user_id
|
||||
is '작성자';
|
||||
comment on column EXPENSE_MASTER.reg_date
|
||||
is '작성';
|
||||
|
||||
-- Create table
|
||||
create table EXPENSE_DETAIL
|
||||
(
|
||||
expense_detail_objid NUMBER not null,
|
||||
expense_master_objid NUMBER not null,
|
||||
exp_sort_cd VARCHAR2(20),
|
||||
exp_subm_cd VARCHAR2(20),
|
||||
exp_subd_cd VARCHAR2(20),
|
||||
card_used VARCHAR2(20),
|
||||
cash_used VARCHAR2(20),
|
||||
payment VARCHAR2(20)
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table EXPENSE_DETAIL
|
||||
is '경비청구 DETAIL';
|
||||
-- Add comments to the columns
|
||||
comment on column EXPENSE_DETAIL.expense_detail_objid
|
||||
is 'OBJID';
|
||||
comment on column EXPENSE_DETAIL.expense_master_objid
|
||||
is '경비마스터OBJID';
|
||||
comment on column EXPENSE_DETAIL.exp_sort_cd
|
||||
is '구분';
|
||||
comment on column EXPENSE_DETAIL.exp_subm_cd
|
||||
is '계정과목';
|
||||
comment on column EXPENSE_DETAIL.exp_subd_cd
|
||||
is '적요';
|
||||
comment on column EXPENSE_DETAIL.card_used
|
||||
is '카드사용액';
|
||||
comment on column EXPENSE_DETAIL.cash_used
|
||||
is '현금사용액';
|
||||
comment on column EXPENSE_DETAIL.payment
|
||||
is '가지급금액';
|
||||
|
||||
|
||||
-- Create table
|
||||
create table FACILITY_ASSEMBLY_PLAN
|
||||
(
|
||||
assembly_plan_objid NUMBER not null,
|
||||
project_mgmt_objid NUMBER not null,
|
||||
project_no VARCHAR2(50),
|
||||
region_cd VARCHAR2(15),
|
||||
customer_cd VARCHAR2(15),
|
||||
order_title VARCHAR2(200),
|
||||
del_date VARCHAR2(8),
|
||||
production_pm VARCHAR2(20),
|
||||
fir_reg_date VARCHAR2(8),
|
||||
chg_date VARCHAR2(8),
|
||||
chg_cnt VARCHAR2(10),
|
||||
reg_id VARCHAR2(20),
|
||||
reg_date DATE
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table FACILITY_ASSEMBLY_PLAN
|
||||
is '설비조립계획';
|
||||
-- Add comments to the columns
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.assembly_plan_objid
|
||||
is '설비조립계획OBJID';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.project_mgmt_objid
|
||||
is '프로젝트 OBJID';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.region_cd
|
||||
is '지역';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.customer_cd
|
||||
is '고객사';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.order_title
|
||||
is '수주명(프로젝트명)';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.del_date
|
||||
is '납품일';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.production_pm
|
||||
is '등록자(엽업 생산SUB-PM)';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.fir_reg_date
|
||||
is '최초등록일';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.chg_date
|
||||
is '변경일';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.chg_cnt
|
||||
is '변경차수';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.reg_id
|
||||
is '등록자';
|
||||
comment on column FACILITY_ASSEMBLY_PLAN.reg_date
|
||||
is '등록일';
|
||||
-- Create/Recreate primary, unique and foreign key constraints
|
||||
alter table FACILITY_ASSEMBLY_PLAN
|
||||
add constraint ASSEMBLY_PLAN_PK primary key (ASSEMBLY_PLAN_OBJID)
|
||||
using index
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
|
||||
|
||||
|
||||
-- Create table
|
||||
create table HUMAN_INPUT_PLAN
|
||||
(
|
||||
input_date VARCHAR2(8) not null,
|
||||
assembly_plan_objid NUMBER not null,
|
||||
plan_in_count VARCHAR2(8),
|
||||
plan_out_count VARCHAR2(8),
|
||||
per_in_count VARCHAR2(8),
|
||||
per_out_count VARCHAR2(8),
|
||||
reg_id VARCHAR2(20),
|
||||
reg_date DATE
|
||||
)
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
-- Add comments to the table
|
||||
comment on table HUMAN_INPUT_PLAN
|
||||
is '투입인원_계획_실적';
|
||||
-- Add comments to the columns
|
||||
comment on column HUMAN_INPUT_PLAN.input_date
|
||||
is '입력일';
|
||||
comment on column HUMAN_INPUT_PLAN.assembly_plan_objid
|
||||
is '설비조립계획 OBJID';
|
||||
comment on column HUMAN_INPUT_PLAN.plan_in_count
|
||||
is '계획(자사) 투입인원';
|
||||
comment on column HUMAN_INPUT_PLAN.plan_out_count
|
||||
is '계획(외주) 투입인원';
|
||||
comment on column HUMAN_INPUT_PLAN.per_in_count
|
||||
is '실적(자사) 투입인원';
|
||||
comment on column HUMAN_INPUT_PLAN.per_out_count
|
||||
is '실적(외주) 투입인원';
|
||||
comment on column HUMAN_INPUT_PLAN.reg_id
|
||||
is '등록자';
|
||||
comment on column HUMAN_INPUT_PLAN.reg_date
|
||||
is '동륵';
|
||||
-- Create/Recreate primary, unique and foreign key constraints
|
||||
alter table HUMAN_INPUT_PLAN
|
||||
add constraint HUMAN_INPUT_PLAN_PK primary key (INPUT_DATE, ASSEMBLY_PLAN_OBJID)
|
||||
using index
|
||||
tablespace USERS
|
||||
pctfree 10
|
||||
initrans 2
|
||||
maxtrans 255
|
||||
storage
|
||||
(
|
||||
initial 64K
|
||||
next 1M
|
||||
minextents 1
|
||||
maxextents unlimited
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user