Add underscores when querying column names
This commit aims to fix tests which fails on not finding columns such as `expireson`. Adding the underscore that are used when creating the table should fix this. An issue with this is that it must have worked previously without underscores. In that case this might break existing usage.
This commit is contained in:
@@ -40,7 +40,7 @@ func TestCleanup(t *testing.T) {
|
||||
|
||||
// SELECT expired sessions. We should get a zero-length result slice back.
|
||||
var results []int64
|
||||
_, err = ss.DbMap.Select(&results, "SELECT id FROM http_sessions WHERE expireson < now()")
|
||||
_, err = ss.DbMap.Select(&results, "SELECT id FROM http_sessions WHERE expires_on < now()")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to select expired sessions from DB: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user