当前位置:网站首页>Schema-validation: wrong column type encountered in column XXX in table XXX
Schema-validation: wrong column type encountered in column XXX in table XXX
2022-07-07 09:20:00 【Wow, it's a small dish】
problem
In the use of Jpa In the process of , The database table uses tinyint Data type of , For record level , The data could be 1,2,3
Report when you start the application :
wrong column type encountered in column [level] in table [tab]; found [tinyint (Types#TINYINT)], but expecting [integer (Types#INTEGER)]
That is to say :
The XXX field in XXX table is found to use the wrong data type , Found using tinyint data type , But you should use integer data type .
reason
After checking, I found ,tinyint The corresponding data type should be boolean, But I didn't treat this field as a boolean Type field , You can't modify the table because of this problem , What shall I do? ...
Finally found , The reason for this problem is : Revised hibernate Of ddl-auto To configure ,
hibernate-auto Set to validate after , The data type will be automatically verified at startup , Therefore, an error was reported
resolvent
spring.jpa.hibernate.ddl-auto=update
ddl-auto What configuration means :
create Delete tables in the database at startup , Then create , Do not delete data table when exiting
create-drop Delete tables in the database at startup , Then create , Delete data table on exit If there is no error in the table
update If the table format is inconsistent at startup, update the table , Keep the original data
validate Check the structure of the project startup table If not, an error will be reported
边栏推荐
- Systick tick timer
- Postman data driven
- Leetcode刷题记录(数组)组合总和、组合总和 II
- Jenkins task grouping
- Serializer & modelserializer of DRF serialization and deserialization
- PMP Exam Preparation experience systematically improve project management knowledge through learning
- 【SVN】SVN是什么?怎么使用?
- Mysql database transaction learning notes
- What are the conditions for applying for NPDP?
- Sublime Text4 download the view in bower and set the shortcut key
猜你喜欢
[istio introduction, architecture, components]
Locust performance test 3 (high concurrency, parameter correlation, assembly point)
超十万字_超详细SSM整合实践_手动实现权限管理
【云原生】DevOps(一):DevOps介绍及Code工具使用
2020 year end summary
Confitest of fixture py
Jenkins modifies the system time
Why is access to the external network prohibited for internal services of the company?
端口复用和重映像
STM32 and motor development (from stand-alone version to Networking)
随机推荐
C语言指针(上篇)
Systick tick timer
【SVN】SVN是什么?怎么使用?
What are the conditions for applying for NPDP?
Interface test API case, data and interface separation
Zen - batch import test cases
Leetcode刷题记录(数组)组合总和、组合总和 II
Two schemes of unit test
How does the project manager write the weekly summary and weekly plan?
Count the number of words C language
How can I apply for a PMP certificate?
Selenium mouse sliding operation event
Jenkins modifies the system time
STM32串口寄存器库函数配置方法
Systick滴答定时器
OpenGL frame buffer
H3C vxlan configuration
Postman interface test (I. installation and use)
Mysql database lock learning notes
Unittest simple project