fix: issue #5752 Field should be unique but is not, causing unnecessary ALTER TABLE executions
Signed-off-by: Hiram Chirino <hiram@hiramchirino.com>
This commit is contained in:
parent
3d35ddba55
commit
0767b6c506
@ -113,7 +113,7 @@ func (schema *Schema) ParseField(fieldStruct reflect.StructField) *Field {
|
||||
AutoIncrement: utils.CheckTruth(tagSetting["AUTOINCREMENT"]),
|
||||
HasDefaultValue: utils.CheckTruth(tagSetting["AUTOINCREMENT"]),
|
||||
NotNull: utils.CheckTruth(tagSetting["NOT NULL"], tagSetting["NOTNULL"]),
|
||||
Unique: utils.CheckTruth(tagSetting["UNIQUE"]),
|
||||
Unique: utils.CheckTruth(tagSetting["UNIQUE"], tagSetting["UNIQUEINDEX"]),
|
||||
Comment: tagSetting["COMMENT"],
|
||||
AutoIncrementIncrement: 1,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user