-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
protected String createTableAppendField(TapField tapField) { String datatype = tapField.getDataType().toUpperCase(); String fieldSql = " " + tapField.getName() + "`" + " " + tapField.getDataType().toUpperCase();
// auto increment
// mysql a table can only create one auto-increment column, and must be the primary key
if (null != tapField.getAutoInc() && tapField.getAutoInc()) {
if (tapField.getPrimaryKeyPos() == 1) {
fieldSql += " AUTO_INCREMENT";
} else {
TapLogger.warn(TAG, "Field \"{}\" cannot be auto increment in mysql, there can be only one auto column and it must be defined the first key", tapField.getName());
}
}`
目前我刚好第2个字段才是自增主键,导致创建表没有吧自增的属性同步过去。 感觉有点奇怪,是不是一个bug?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels