Skip to content

Commit cefaaf1

Browse files
authored
Merge pull request #28 from Leets-Official/feat]-#21-프로젝트-소개-로직-개발
[fix] db 이모지 사용 가능하게 설정
2 parents d9b2d80 + db6c75b commit cefaaf1

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/main/java/land/leets/domain/portfolio/domain/Portfolio.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class Portfolio extends BaseTimeEntity {
3131
@Column(nullable = false)
3232
private String summary;
3333

34-
@Column(nullable = false)
34+
@Column(nullable = false, columnDefinition = "text(1000)")
3535
private String description;
3636

3737
@Column(nullable = false)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package land.leets.global.config;
2+
3+
import org.springframework.beans.factory.annotation.Autowired;
4+
import org.springframework.boot.ApplicationArguments;
5+
import org.springframework.boot.ApplicationRunner;
6+
import org.springframework.jdbc.core.JdbcTemplate;
7+
import org.springframework.stereotype.Component;
8+
9+
@Component
10+
public class DatabaseSetup implements ApplicationRunner {
11+
12+
@Autowired
13+
private JdbcTemplate jdbcTemplate;
14+
15+
@Override
16+
public void run(ApplicationArguments args) throws Exception {
17+
jdbcTemplate.execute("ALTER DATABASE leets CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci");
18+
jdbcTemplate.execute("ALTER TABLE portfolios CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci");
19+
}
20+
}

0 commit comments

Comments
 (0)