mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-11-28 01:04:04 +08:00
修复Issue中反馈的问题
This commit is contained in:
@@ -7,7 +7,7 @@ spring:
|
||||
validation-query: SELECT 1
|
||||
test-on-borrow: true
|
||||
flyway:
|
||||
locations: classpath:db/mysql
|
||||
locations: classpath:db/postgres
|
||||
baseline-on-migrate: true
|
||||
table: dbswitch_schema_history
|
||||
enabled: true
|
||||
|
||||
@@ -148,11 +148,11 @@ public class DmMetadataQueryProvider extends AbstractMetadataProvider {
|
||||
break;
|
||||
case ColumnMetaData.TYPE_STRING:
|
||||
if (null != pks && pks.contains(fieldname)) {
|
||||
retval.append("VARCHAR(" + length + ")");
|
||||
retval.append("NVARCHAR(" + length + ")");
|
||||
} else if (length > 0 && length < 1900) {
|
||||
// 最大存储长度由数据库页面大小决定,支持按照字节存放字符串,数据库页面大小与实际最大存储长度的关系为:
|
||||
// 4K->1900;8k->3900;16k->8000;32k->8188
|
||||
retval.append("VARCHAR(").append(length).append(')');
|
||||
retval.append("NVARCHAR(").append(length).append(')');
|
||||
} else {
|
||||
retval.append("TEXT");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user