You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.4 KiB
SQL
31 lines
1.4 KiB
SQL
-- 로그인 로그 ID 시퀀스 생성
|
|
CREATE SEQUENCE IF NOT EXISTS seq_login_log_id START WITH 1 INCREMENT BY 1;
|
|
|
|
create table tb_login_log
|
|
(
|
|
LOG_ID varchar(20) comment '로그 ID - 시퀀스 기반'
|
|
primary key,
|
|
USER_ID varchar(20) null comment '사용자 ID',
|
|
USER_ACNT varchar(20) null comment '사용자 계정',
|
|
LOGIN_DTTM datetime not null comment '로그인 시간',
|
|
IP_ADDR varchar(50) null comment 'IP 주소',
|
|
SUCCESS_YN varchar(1) not null comment '성공 여부',
|
|
FAIL_REASON varchar(100) null comment '실패 사유',
|
|
LOGIN_TYPE varchar(20) default 'WEB' null comment '로그인 유형',
|
|
SESSION_ID varchar(100) null comment '세션 ID',
|
|
USER_AGENT varchar(500) null comment '사용자 에이전트',
|
|
DEVICE_INFO varchar(100) null comment '접속 디바이스 정보',
|
|
REG_DTTM datetime default current_timestamp() null comment '등록 일시'
|
|
)
|
|
comment '로그인 로그';
|
|
|
|
create index IDX_TB_LOGIN_LOG_LOGIN_DTTM
|
|
on tb_login_log (LOGIN_DTTM);
|
|
|
|
create index IDX_TB_LOGIN_LOG_SUCCESS_YN
|
|
on tb_login_log (SUCCESS_YN);
|
|
|
|
create index IDX_TB_LOGIN_LOG_USER_ID
|
|
on tb_login_log (USER_ID);
|
|
|