create table admins(
admin_no serial,
admin_id text,
admin_pw text,
admin_name text,
admin_level_cd smallint,
admin_status_flg boolean default false,
admin_its timestamp default now(),
admin_uts timestamp default now(),
CONSTRAINT admins_pkey PRIMARY KEY (admin_no)
);

create table admins_login_histories(
history_no bigserial,
admin_no integer,
history_its timestamp default now(),
CONSTRAINT admins_login_histories_pkey PRIMARY KEY (history_no)
);

ALTER TABLE ONLY admins_login_histories
    ADD CONSTRAINT admins_login_histories_admin_no_fkey FOREIGN KEY (admin_no) REFERENCES admins(admin_no) ON DELETE CASCADE;

