Fixed behaviour of "drop_unique_index"
This commit is contained in:
parent
4019c14651
commit
4e4b2dfdd4
@ -572,7 +572,7 @@ func (scope *Scope) autoIndex() *Scope {
|
|||||||
indexes[name] = append(indexes[name], field.DBName)
|
indexes[name] = append(indexes[name], field.DBName)
|
||||||
}
|
}
|
||||||
|
|
||||||
if field.IgnoreUniqueIndex {
|
if !field.IgnoreUniqueIndex {
|
||||||
if name, ok := sqlSettings["UNIQUE_INDEX"]; ok {
|
if name, ok := sqlSettings["UNIQUE_INDEX"]; ok {
|
||||||
if name == "UNIQUE_INDEX" {
|
if name == "UNIQUE_INDEX" {
|
||||||
name = fmt.Sprintf("uix_%v_%v", scope.TableName(), field.DBName)
|
name = fmt.Sprintf("uix_%v_%v", scope.TableName(), field.DBName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user