The execution process of the SQL statement is visible in the logs, but the table cannot be found in the PUBLIC schema.

39 views
Skip to first unread message

Wesley zen

unread,
Mar 26, 2025, 12:15:13 PMMar 26
to H2 Database

Problem description: I integrated H2 Database for unit testing in my current project. I can see the JDBC connection in the console and the execution of SQL statements, but I can’t see any tables in the H2 Database.

Maven version:Spring-boot-2.3.12,Mybtis-Plus-3.5.3.1,h2-1.4.200 
JDK Version:1.8
 log details:
[main] DEBUG org.springframework.jdbc.datasource.init.ScriptUtils - Executing SQL script from class path resource [script/payment_core.sql]
18:56:37.851 [main] DEBUG org.springframework.jdbc.datasource.init.ScriptUtils - 0 returned as update count for SQL: CREATE TABLE order_status_history ( `id` varchar(100) , `order_id` varchar(100), `channel_id` varchar(100), `payment_method_code` varchar(80), `order_type` varchar(80), `status` varchar(80), `reason` varchar(1024), `created_at` datetime, PRIMARY KEY(`id`) )
18:56:37.851 [main] DEBUG org.springframework.jdbc.datasource.init.ScriptUtils - Executed SQL script from class path resource [script/payment_core.sql] in 14 ms.
a.png
Reply all
Reply to author
Forward
0 new messages