limit diff

This commit is contained in:
6543 2023-08-07 16:13:08 +02:00
parent e6828f020e
commit fc77a3b490
No known key found for this signature in database
GPG Key ID: B8BE6D610E61C862
1 changed files with 9 additions and 0 deletions

View File

@ -235,6 +235,15 @@ func (session *Session) SyncWithOptions(opts SyncOptions, beans ...interface{})
} }
} }
if oriIndex != nil && oriIndex.Type != index.Type {
sql := engine.dialect.DropIndexSQL(tbNameWithSchema, oriIndex)
_, err = session.exec(sql)
if err != nil {
return nil, err
}
oriIndex = nil
}
if oriIndex == nil { if oriIndex == nil {
addedNames[name] = index addedNames[name] = index
} }