Skip to content

Commit

Permalink
mysql: Fix column name bug.
Browse files Browse the repository at this point in the history
This fixes incorrectly named columns in a sql insert statement. The
statement was part of a function that is only used during database
migrations, so it does not impact normal operation.
  • Loading branch information
lukebp authored Apr 28, 2022
1 parent 6c0d426 commit 94dd965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion politeiawww/legacy/user/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ func (m *mysql) InsertUser(u user.User) error {
CreatedAt: time.Now().Unix(),
}
_, err = m.userDB.ExecContext(ctx,
"INSERT INTO users (ID, username, uBlob, createdAt) VALUES (?, ?, ?, ?)",
"INSERT INTO users (id, username, u_blob, created_at) VALUES (?, ?, ?, ?)",
ur.ID, ur.Username, ur.Blob, ur.CreatedAt)
if err != nil {
return fmt.Errorf("insert user: %v", err)
Expand Down

0 comments on commit 94dd965

Please # to comment.