diff --git a/src/main/java/org/sopt/lequuServer/InitDb.java b/src/main/java/org/sopt/lequuServer/InitDb.java index 0e4b69e..f836980 100644 --- a/src/main/java/org/sopt/lequuServer/InitDb.java +++ b/src/main/java/org/sopt/lequuServer/InitDb.java @@ -1,5 +1,7 @@ package org.sopt.lequuServer; +import static org.sopt.lequuServer.domain.sticker.model.StickerCategory.CAT; + import jakarta.annotation.PostConstruct; import jakarta.persistence.EntityManager; import java.util.Arrays; @@ -9,6 +11,7 @@ import org.sopt.lequuServer.domain.member.model.Member; import org.sopt.lequuServer.domain.member.model.SocialPlatform; import org.sopt.lequuServer.domain.note.model.Note; +import org.sopt.lequuServer.domain.sticker.model.Sticker; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -141,11 +144,11 @@ public void dbInit() { em.persist(note2); } -// Sticker sticker1 = Sticker.builder() -// .bookId(0L) -// .category(BIRTHDAY) -// .stickerImage("https://dzfv99wxq6tx0.cloudfront.net/stickers/birth_1.svg") -// .build(); + Sticker sticker1 = Sticker.builder() + .bookId(0L) + .category(CAT) + .stickerImage("https://dzfv99wxq6tx0.cloudfront.net/stickers/birth_1.svg") + .build(); // em.persist(sticker1); // for (int i = 0; i < 2; i++) { // Sticker sticker = Sticker.builder() diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index df6666f..e1e35ca 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -13,7 +13,7 @@ spring: jpa: show-sql: true hibernate: - ddl-auto: update + ddl-auto: create properties: hibernate: format_sql: true