Skip to content

Commit

Permalink
Move single checks to top of function
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanslade authored and andrew-farries committed Dec 20, 2024
1 parent 6e6e573 commit 8c50273
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/sql2pgroll/create_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ func canConvertCreateIndexStmt(stmt *pgq.IndexStmt) bool {
if len(stmt.GetOptions()) > 1 {
return false
}
if stmt.GetTableSpace() != "" {
return false
}
if stmt.GetIndexIncludingParams() != nil {
return false
}
for _, param := range stmt.GetIndexParams() {
if param.GetIndexElem().GetCollation() != nil {
return false
Expand All @@ -105,12 +111,6 @@ func canConvertCreateIndexStmt(stmt *pgq.IndexStmt) bool {
return false
}
}
if stmt.GetTableSpace() != "" {
return false
}
if stmt.GetIndexIncludingParams() != nil {
return false
}

return true
}

0 comments on commit 8c50273

Please sign in to comment.