Hibernate:
alter table alarm
drop
foreign key FKjdot8d6e1wmd227isu080k760
Hibernate:
alter table alarm
drop
foreign key FK6yk93nqmu865xvtraxe3p3q7r
Hibernate:
alter table comment
drop
foreign key FKs1slvnkuemjsq2kj4h3vhx7i1
Hibernate:
alter table comment
drop
foreign key FKn6xssinlrtfnm61lwi0ywn71q
Hibernate:
alter table liked
drop
foreign key FKt22ayicw3p3ho63o5e9wl8dgv
Hibernate:
alter table liked
drop
foreign key FKop90s6mfbhbfusd0ppe6nr4lm
Hibernate:
alter table post
drop
foreign key FK51aeb5le008k8klgnyfaalmn
Hibernate:
drop table if exists alarm
Hibernate:
drop table if exists comment
Hibernate:
drop table if exists liked
Hibernate:
drop table if exists post
Hibernate:
drop table if exists `user`
Hibernate:
create table alarm (
id integer not null auto_increment,
alarm_type varchar(255),
args json,
deleted_at datetime(6),
registered_at datetime(6),
updated_at datetime(6),
post_id integer,
user_id integer,
primary key (id)
) engine=InnoDB
Hibernate:
create table comment (
id integer not null auto_increment,
comment varchar(255),
deleted_at datetime(6),
registered_at datetime(6),
updated_at datetime(6),
post_id integer,
user_id integer,
primary key (id)
) engine=InnoDB
Hibernate:
create table liked (
id integer not null auto_increment,
deleted_at datetime(6),
registered_at datetime(6),
updated_at datetime(6),
post_id integer,
user_id integer,
primary key (id)
) engine=InnoDB
Hibernate:
create table post (
id integer not null auto_increment,
body TEXT,
deleted_at datetime(6),
registered_at datetime(6),
title varchar(255),
updated_at datetime(6),
user_id integer,
primary key (id)
) engine=InnoDB
Hibernate:
create table `user` (
id integer not null auto_increment,
deleted_at datetime(6),
password varchar(255),
registered_at datetime(6),
role varchar(255),
updated_at datetime(6),
user_name varchar(255),
primary key (id)
) engine=InnoDB
Hibernate: create index user_id_idx on alarm (user_id)
Hibernate: create index post_id_idx on comment (post_id)
Hibernate:
alter table alarm
add constraint FKjdot8d6e1wmd227isu080k760
foreign key (post_id)
references post (id)
Hibernate:
alter table alarm
add constraint FK6yk93nqmu865xvtraxe3p3q7r
foreign key (user_id)
references `user` (id)
Hibernate:
alter table comment
add constraint FKs1slvnkuemjsq2kj4h3vhx7i1
foreign key (post_id)
references post (id)
Hibernate:
alter table comment
add constraint FKn6xssinlrtfnm61lwi0ywn71q
foreign key (user_id)
references `user` (id)
Hibernate:
alter table liked
add constraint FKt22ayicw3p3ho63o5e9wl8dgv
foreign key (post_id)
references post (id)
Hibernate:
alter table liked
add constraint FKop90s6mfbhbfusd0ppe6nr4lm
foreign key (user_id)
references `user` (id)
Hibernate:
alter table post
add constraint FK51aeb5le008k8klgnyfaalmn
foreign key (user_id)
references `user` (id)
'sns' 카테고리의 다른 글
API / JPA 로직 별 실행되는 쿼리 확인 (0) | 2024.01.04 |
---|---|
프로젝트 api 정리 (0) | 2023.12.30 |
댓글