Merge branch 'master' into generate-cover-html
This commit is contained in:
commit
774415a6ff
|
@ -1030,11 +1030,10 @@ func (db *postgres) DropIndexSQL(tableName string, index *schemas.Index) string
|
||||||
tableParts := strings.Split(strings.Replace(tableName, `"`, "", -1), ".")
|
tableParts := strings.Split(strings.Replace(tableName, `"`, "", -1), ".")
|
||||||
tableName = tableParts[len(tableParts)-1]
|
tableName = tableParts[len(tableParts)-1]
|
||||||
|
|
||||||
if !strings.HasPrefix(idxName, "UQE_") &&
|
if index.IsRegular {
|
||||||
!strings.HasPrefix(idxName, "IDX_") {
|
if index.Type == schemas.UniqueType && !strings.HasPrefix(idxName, "UQE_") {
|
||||||
if index.Type == schemas.UniqueType {
|
|
||||||
idxName = fmt.Sprintf("UQE_%v_%v", tableName, index.Name)
|
idxName = fmt.Sprintf("UQE_%v_%v", tableName, index.Name)
|
||||||
} else {
|
} else if index.Type == schemas.IndexType && !strings.HasPrefix(idxName, "IDX_") {
|
||||||
idxName = fmt.Sprintf("IDX_%v_%v", tableName, index.Name)
|
idxName = fmt.Sprintf("IDX_%v_%v", tableName, index.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue