File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public class Portfolio extends BaseTimeEntity {
31
31
@ Column (nullable = false )
32
32
private String summary ;
33
33
34
- @ Column (nullable = false )
34
+ @ Column (nullable = false , columnDefinition = "text(1000)" )
35
35
private String description ;
36
36
37
37
@ Column (nullable = false )
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments