fix: db ddl 현행화

main
Jonguk. Lim 2 months ago
parent 67c6bb1249
commit e1e79afcf9

@ -1,7 +1,25 @@
/* FIXME: 카카오톡에 맞게 변경 필요 */
create table ENS_TMPLT_MNG_KKO_TALK
(
ORG_CD VARCHAR2(255 char) not null,
TMPLT_CD VARCHAR2(30 char) not null,
CI_TRANS_USE_YN VARCHAR2(1 char) not null,
CS_NAME VARCHAR2(10 char) not null,
CS_NUMBER VARCHAR2(20 char) not null,
PRY_MESSAGE VARCHAR2(2000 char),
TMPLT_CS_INFO_USE_YN VARCHAR2(1 char) not null,
TMPLT_MSG_USE_YN VARCHAR2(1 char) not null,
primary key (ORG_CD, TMPLT_CD),
constraint FK_TMPLT_MNG_KKO_TALK
foreign key (ORG_CD, TMPLT_CD) references ENS_TMPLT_MNG
);
create table ENS_SND_DTL_KKO_TALK create table ENS_SND_DTL_KKO_TALK
( (
SEND_DETAIL_ID NUMBER(19) not null SEND_DETAIL_ID NUMBER(19) not null
primary key, primary key,
ENVELOPE_ID VARCHAR2(34),
EXTERNAL_ID VARCHAR2(40),
TITLE VARCHAR2(40), TITLE VARCHAR2(40),
LINK VARCHAR2(500), LINK VARCHAR2(500),
HASH VARCHAR2(99), HASH VARCHAR2(99),
@ -14,24 +32,32 @@ create table ENS_SND_DTL_KKO_TALK
PHONE_NUMBER VARCHAR2(30), PHONE_NUMBER VARCHAR2(30),
NAME VARCHAR2(50), NAME VARCHAR2(50),
BIRTHDAY VARCHAR2(8), BIRTHDAY VARCHAR2(8),
EXTERNAL_ID VARCHAR2(40), STATUS VARCHAR2(20),
ENVELOPE_ID VARCHAR2(34), SENT_AT VARCHAR2(20),
RECEIVED_AT VARCHAR2(20),
READ_AT VARCHAR2(20),
AUTHENTICATED_AT VARCHAR2(20),
OTT_VERIFIED_AT VARCHAR2(20),
IS_NOTIFICATION_UNAVAILABLE VARCHAR2(10),
USER_NOTIFIED_AT VARCHAR2(20),
DISTRIBUTION_RECEIVED_AT VARCHAR2(20),
ERROR_CODE VARCHAR2(40), ERROR_CODE VARCHAR2(40),
ERROR_MESSAGE CLOB, ERROR_MESSAGE CLOB,
MK_JID VARCHAR2(24), MK_JID VARCHAR2(24),
MK_TMPLT_MSG_JSON_DATA VARCHAR2(4000), MK_TMPLT_MSG_JSON_DATA VARCHAR2(4000),
MK_BILL_USE_YN VARCHAR2(1),
LAST_UPDT_DT TIMESTAMP(6), LAST_UPDT_DT TIMESTAMP(6),
REGIST_DT TIMESTAMP(6), REGIST_DT TIMESTAMP(6),
BILL_UID VARCHAR2(45 char) BILL_UID VARCHAR2(45)
constraint FK_BILL_UID constraint FK_BILL_UID
references ENS_BILL (BILL_UID), references IUP.ENS_BILL (BILL_UID),
SEND_MAST_ID NUMBER(19) SEND_MAST_ID NUMBER(19)
constraint FK_SEND_MAST_ID constraint FK_SEND_MAST_ID
references ENS_SND_MAST(SEND_MAST_ID) references IUP.ENS_SND_MAST
); );
comment on table ENS_SND_DTL_KKO_TALK is '카카오톡 상세'; comment on table ENS_SND_DTL_KKO_TALK is '카카오톡 상세';
comment on column ENS_SND_DTL_KKO_TALK.SEND_DETAIL_ID is '발송 상세 ID'; comment on column ENS_SND_DTL_KKO_TALK.SEND_DETAIL_ID is '발송 상세 ID';
comment on column ENS_SND_DTL_KKO_TALK.SEND_MAST_ID is '발송 마스터 ID';
comment on column ENS_SND_DTL_KKO_TALK.TITLE is '제목'; comment on column ENS_SND_DTL_KKO_TALK.TITLE is '제목';
comment on column ENS_SND_DTL_KKO_TALK.LINK is '웹링크'; comment on column ENS_SND_DTL_KKO_TALK.LINK is '웹링크';
comment on column ENS_SND_DTL_KKO_TALK.HASH is '해시'; comment on column ENS_SND_DTL_KKO_TALK.HASH is '해시';
@ -57,33 +83,41 @@ comment on column ENS_SND_DTL_KKO_TALK.USER_NOTIFIED_AT is '알림톡 수신 일
comment on column ENS_SND_DTL_KKO_TALK.DISTRIBUTION_RECEIVED_AT is '유통정보 수신 일시'; comment on column ENS_SND_DTL_KKO_TALK.DISTRIBUTION_RECEIVED_AT is '유통정보 수신 일시';
comment on column ENS_SND_DTL_KKO_TALK.ERROR_CODE is '에러 코드'; comment on column ENS_SND_DTL_KKO_TALK.ERROR_CODE is '에러 코드';
comment on column ENS_SND_DTL_KKO_TALK.ERROR_MESSAGE is '에러 메시지'; comment on column ENS_SND_DTL_KKO_TALK.ERROR_MESSAGE is '에러 메시지';
comment on column ENS_SND_DTL_KKO_TALK.REGIST_DT is '등록 일시';
comment on column ENS_SND_DTL_KKO_TALK.LAST_UPDT_DT is '수정 일시'; comment on column ENS_SND_DTL_KKO_TALK.LAST_UPDT_DT is '수정 일시';
comment on column ENS_SND_DTL_KKO_TALK.REGIST_DT is '등록 일시';
comment on column ENS_SND_DTL_KKO_TALK.SEND_MAST_ID is '발송 마스터 ID';
/* FIXME: 카카오톡에 맞게 변경 필요 */ create table ENS_SND_DTL_KKO_TALK_OTT_HIS
create table ENS_TMPLT_MNG_KKO_TALK
( (
CI_TRANS_USE_YN VARCHAR2(1 char) not null, ID NUMBER(19) not null
CS_NAME VARCHAR2(10 char) not null, primary key,
CS_NUMBER VARCHAR2(20 char) not null, ENVELOPE_ID VARCHAR2(255 char),
PRY_MESSAGE VARCHAR2(2000 char), EXTERNAL_ID VARCHAR2(255 char),
TMPLT_CS_INFO_USE_YN VARCHAR2(1 char) not null, RECEIVED_AT VARCHAR2(19),
TMPLT_MSG_USE_YN VARCHAR2(1 char) not null, SENT_AT VARCHAR2(19),
ORG_CD VARCHAR2(255 char) not null, PAYLOAD VARCHAR2(255 char),
TMPLT_CD VARCHAR2(30 char) not null, SIGNED_AT VARCHAR2(255 char),
primary key (ORG_CD, TMPLT_CD), TOKEN VARCHAR2(255 char),
constraint FK_TMPLT_MNG_KKO_TALK TOKEN_EXPIRES_AT VARCHAR2(19),
foreign key (ORG_CD, TMPLT_CD) references ENS_TMPLT_MNG TOKEN_STATUS VARCHAR2(255 char),
TOKEN_USED_AT VARCHAR2(19),
AUTHENTICATED_AT VARCHAR2(19),
USER_NOTIFIED_AT VARCHAR2(19),
ERROR_CODE VARCHAR2(255 char),
ERROR_MESSAGE CLOB,
REGIST_DT TIMESTAMP(6)
); );
create index IDX_SND_DTL_KKO_TALK_OTT_HIS_01
on ENS_SND_DTL_KKO_TALK_OTT_HIS (REGIST_DT);
create table ENS_SND_DTL_KKO_TALK_REQ_HIS create table ENS_SND_DTL_KKO_TALK_REQ_HIS
( (
ID NUMBER(19) not null ID NUMBER(19) not null
primary key, primary key,
SEND_DETAIL_ID NUMBER(19),
ENVELOPE_ID VARCHAR2(255 char), ENVELOPE_ID VARCHAR2(255 char),
EXTERNAL_ID VARCHAR2(255 char), EXTERNAL_ID VARCHAR2(255 char),
RESP_RAW_MSG VARCHAR2(1000 char), RESP_RAW_MSG VARCHAR2(1000 char),
SEND_DETAIL_ID NUMBER(19),
SEND_RAW_MSG VARCHAR2(4000 char) not null, SEND_RAW_MSG VARCHAR2(4000 char) not null,
ERROR_CODE VARCHAR2(255 char), ERROR_CODE VARCHAR2(255 char),
ERROR_MESSAGE CLOB, ERROR_MESSAGE CLOB,
@ -96,20 +130,20 @@ create table ENS_SND_DTL_KKO_TALK_STAT_HIS
( (
ID NUMBER(19) not null ID NUMBER(19) not null
primary key, primary key,
SEND_DETAIL_ID NUMBER(19) not null,
ENVELOPE_ID VARCHAR2(255 char), ENVELOPE_ID VARCHAR2(255 char),
EXTERNAL_ID VARCHAR2(255 char), EXTERNAL_ID VARCHAR2(255 char),
AUTHENTICATED_AT VARCHAR2(19),
READ_AT VARCHAR2(19), READ_AT VARCHAR2(19),
READ_EXPIRED_AT VARCHAR2(19), READ_EXPIRED_AT VARCHAR2(19),
RECEIVED_AT VARCHAR2(19), RECEIVED_AT VARCHAR2(19),
OTT_VERIFIED_AT VARCHAR2(19),
SENT_AT VARCHAR2(19), SENT_AT VARCHAR2(19),
STATUS VARCHAR2(255 char), STATUS VARCHAR2(255 char),
AUTHENTICATED_AT VARCHAR2(19),
DISTRIBUTION_RECEIVED_AT VARCHAR2(19), DISTRIBUTION_RECEIVED_AT VARCHAR2(19),
PAYLOAD VARCHAR2(255 char), PAYLOAD VARCHAR2(255 char),
SEND_DETAIL_ID NUMBER(19) not null,
TOKEN_USED_AT VARCHAR2(19), TOKEN_USED_AT VARCHAR2(19),
USER_NOTIFIED_AT VARCHAR2(19), USER_NOTIFIED_AT VARCHAR2(19),
OTT_VERIFIED_AT VARCHAR2(19),
ERROR_CODE VARCHAR2(255 char), ERROR_CODE VARCHAR2(255 char),
ERROR_MESSAGE CLOB, ERROR_MESSAGE CLOB,
REGIST_DT TIMESTAMP(6) REGIST_DT TIMESTAMP(6)
@ -117,29 +151,6 @@ create table ENS_SND_DTL_KKO_TALK_STAT_HIS
create index IDX_SND_DTL_KKO_TALK_STAT_HIS_01 create index IDX_SND_DTL_KKO_TALK_STAT_HIS_01
on ENS_SND_DTL_KKO_TALK_STAT_HIS (REGIST_DT); on ENS_SND_DTL_KKO_TALK_STAT_HIS (REGIST_DT);
create table ENS_SND_DTL_KKO_TALK_OTT_HIS
(
ID NUMBER(19) not null
primary key,
ENVELOPE_ID VARCHAR2(255 char),
EXTERNAL_ID VARCHAR2(255 char),
AUTHENTICATED_AT VARCHAR2(19),
RECEIVED_AT VARCHAR2(19),
SENT_AT VARCHAR2(19),
PAYLOAD VARCHAR2(255 char),
SIGNED_AT VARCHAR2(255 char),
TOKEN VARCHAR2(255 char),
TOKEN_EXPIRES_AT VARCHAR2(19),
TOKEN_STATUS VARCHAR2(255 char),
TOKEN_USED_AT VARCHAR2(19),
USER_NOTIFIED_AT VARCHAR2(19),
ERROR_CODE VARCHAR2(255 char),
ERROR_MESSAGE CLOB,
REGIST_DT TIMESTAMP(6)
);
create index IDX_SND_DTL_KKO_TALK_OTT_HIS_01
on ENS_SND_DTL_KKO_TALK_OTT_HIS (REGIST_DT);
ALTER TABLE ENS_ORG_MNG ADD KAKAO_PARTNER_REST_API_KEY VARCHAR2(100); ALTER TABLE ENS_ORG_MNG ADD KAKAO_PARTNER_REST_API_KEY VARCHAR2(100);
ALTER TABLE ENS_ORG_MNG ADD KAKAO_DEALER_REST_API_KEY VARCHAR2(100); ALTER TABLE ENS_ORG_MNG ADD KAKAO_DEALER_REST_API_KEY VARCHAR2(100);

Loading…
Cancel
Save