Skip to content

Commit

Permalink
Feat: orders 테이블 스키마 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
Louie-03 committed Apr 26, 2022
1 parent 401b9ad commit c20b925
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions BE/src/main/resources/db/schema.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
drop table if exists orders;
drop table if exists product_image;
drop table if exists product;
drop table if exists discount_policy;
Expand Down Expand Up @@ -35,8 +36,18 @@ create table product

create table product_image
(
id bigint auto_increment primary key,
product_id bigint not null,
image_url varchar(1000) not null,
id bigint auto_increment primary key,
product_id bigint not null,
image_url varchar(1000) not null,
foreign key (product_id) references product (id)
);

create table orders
(
id bigint auto_increment primary key,
product_id bigint not null,
total_price bigint not null,
count bigint not null,
delivery_price bigint not null,
foreign key (product_id) references product (id)
);

0 comments on commit c20b925

Please sign in to comment.