Skip to content

Commit

Permalink
[fix] 데이터 삽입전 테이블 존재하는지 확인
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeesw committed Aug 23, 2024
1 parent 3b85587 commit 84f269f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions data.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
-- 장르 초기화 (한국십진분류법(KDC) 6판 기준)
USE booktalk;
CREATE TABLE IF NOT EXISTS genre (
genre_id bigint auto_increment
primary key,
kdc_num varchar(255) null,
name varchar(255) null,
parent_genre_id bigint null,
constraint FKroi0p36nixht1l7b3hadih34l
foreign key (parent_genre_id) references genre (genre_id)
);

INSERT IGNORE INTO genre (parent_genre_id, kdc_num, name)
values
-- Level 1
Expand Down

0 comments on commit 84f269f

Please sign in to comment.