Skip to content

Commit

Permalink
rename variable to query and remove noisy log
Browse files Browse the repository at this point in the history
  • Loading branch information
sredny buitrago authored and sredny buitrago committed Dec 5, 2024
1 parent f1919f2 commit 7d44007
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pumps/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ func (c *SQLPump) createIndex(indexBaseName, tableName, column string) error {
return errors.New("cannot create index for non existent column " + column)
}

sql := fmt.Sprintf("CREATE INDEX %s IF NOT EXISTS %s ON %s (%s)", option, indexName, tableName, column)
err := c.db.Exec(sql).Error
query := fmt.Sprintf("CREATE INDEX %s IF NOT EXISTS %s ON %s (%s)", option, indexName, tableName, column)
err := c.db.Exec(query).Error
if err != nil {
c.log.WithFields(logrus.Fields{
"index": indexName,
Expand Down
1 change: 0 additions & 1 deletion pumps/sql_aggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ func (c *SQLAggregatePump) ensureIndex(tableName string, background bool) error
c.log.Info("Creating index for table ", tableName, "...")
return createIndexFn(c)
}
c.log.Info(indexName, " already exists.")

return nil
}
Expand Down

0 comments on commit 7d44007

Please sign in to comment.