-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RDPF-171] perfume-note 연관관계 entity migration file 추가
Co-authored-by: oliviarla <[email protected]> Co-authored-by: Big-Cir97 <[email protected]>
- Loading branch information
1 parent
2dddae3
commit 235e139
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
perfume-api/src/main/resources/db/migration/V1.0.2__note.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |