Skip to content

Commit

Permalink
[RDPF-171] perfume-note 연관관계 entity migration file 추가
Browse files Browse the repository at this point in the history
Co-authored-by: oliviarla <[email protected]>
Co-authored-by: Big-Cir97 <[email protected]>
  • Loading branch information
3 people committed Sep 17, 2023
1 parent 2dddae3 commit 235e139
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions perfume-api/src/main/resources/db/migration/V1.0.2__note.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
create table perfume_note
(
id bigint auto_increment not null,
perfume_id bigint not null,
note_id bigint not null,
note_level VARCHAR(255) not null,
created_at datetime not null,
updated_at datetime not null,
deleted_at datetime null,
constraint pk_perfume_note primary key (id)
);

create index idx_perfume_note_1 on perfume_note (perfume_id);

create index idx_perfume_note_2 on perfume_note (note_id);

alter table note
add constraint uni_note_name unique (name);

alter table perfume
add concentration VARCHAR(255) not null;

alter table perfume drop column strength;

alter table perfume drop column duration;

0 comments on commit 235e139

Please sign in to comment.