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:
@@ -218,7 +218,7 @@ func (db *PGStore) save(session *sessions.Session) error {
|
||||
if session.IsNew {
|
||||
err = db.DbMap.Insert(&s)
|
||||
} else {
|
||||
_, err = db.DbMap.Exec("update http_sessions set data=$1, modifiedon=$2, expireson=$3 where key=$4", s.Data, s.ModifiedOn, s.ExpiresOn, s.Key)
|
||||
_, err = db.DbMap.Exec("update http_sessions set data=$1, modified_on=$2, expires_on=$3 where key=$4", s.Data, s.ModifiedOn, s.ExpiresOn, s.Key)
|
||||
}
|
||||
|
||||
return err
|
||||
|
Reference in New Issue
Block a user