mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-07-27 07:55:37 +08:00
处理hibernate自动建表字段类型
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package cn.lihongjie.coal.config;
|
||||
|
||||
import org.hibernate.dialect.PostgreSQLDialect;
|
||||
import org.hibernate.type.SqlTypes;
|
||||
|
||||
public class MyPostgreSQLDialect extends PostgreSQLDialect {
|
||||
|
||||
@Override
|
||||
protected String columnType(int sqlTypeCode) {
|
||||
if (sqlTypeCode == SqlTypes.VARCHAR) {
|
||||
return "text";
|
||||
}
|
||||
return super.columnType(sqlTypeCode);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user