Skip to content

Commit

Permalink
config: dev schema 동기화 (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
seokhwan-an authored Oct 19, 2023
1 parent 51d6cd3 commit a5f9f5e
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions backend/src/main/resources/dev/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ create table if not exists song
title varchar(100) not null,
singer varchar(50) not null,
length integer not null,
video_url text not null,
video_id varchar(20) not null,
album_cover_url text not null,
genre varchar(255) check (genre in
('BALLAD', 'DANCE', 'HIPHOP', 'RHYTHM_AND_BLUES', 'INDIE',
'ROCK_METAL', 'TROT', 'FOLK_BLUES', 'POP', 'JAZZ',
'CLASSIC', 'J_POP', 'EDM', 'ETC')),
created_at timestamp(6) not null,
primary key (id)
);
Expand All @@ -26,6 +30,7 @@ create table if not exists killing_part
start_second integer not null,
length integer not null,
song_id bigint not null,
like_count integer not null default 0,
created_at timestamp(6) not null,
primary key (id)
);
Expand All @@ -45,6 +50,7 @@ create table if not exists killing_part_comment
(
id bigint auto_increment,
killing_part_id bigint not null,
member_id bigint not null,
content varchar(200) not null,
created_at timestamp(6) not null,
primary key (id)
Expand All @@ -56,7 +62,7 @@ create table if not exists voting_song
title varchar(100) not null,
singer varchar(50) not null,
length integer not null,
video_url text not null,
video_id varchar(20) not null,
album_cover_url text not null,
created_at timestamp(6) not null,
primary key (id)
Expand All @@ -74,26 +80,17 @@ create table if not exists vote
(
id bigint auto_increment,
voting_song_part_id bigint not null,
member_id bigint not null,
created_at timestamp(6) not null,
primary key (id)
);

create table if not exists member
(
id bigint auto_increment,
email varchar(100) not null,
nickname varchar(100) not null,
primary key (id)
);

create table if not exists member_part
(
id bigint auto_increment,
start_second integer not null,
length integer not null,
song_id bigint not null,
member_id bigint not null,
created_at timestamp(6) not null,
id bigint auto_increment,
email varchar(100) not null,
nickname varchar(100) not null,
created_at timestamp(6) not null,
primary key (id)
);

Expand Down

0 comments on commit a5f9f5e

Please sign in to comment.