db: match placeholders with columns
Soju inserts 9 columns but only with 8 placeholders. This causes channels not being saved properly and also logging errors like this: downstream ...: failed to create or update channel ...: 8 values for 9 columns
This commit is contained in:
parent
9b40cfe95c
commit
cc83da4cd1
2
db.go
2
db.go
@ -596,7 +596,7 @@ func (db *DB) StoreChannel(networkID int64, ch *Channel) error {
|
||||
} else {
|
||||
var res sql.Result
|
||||
res, err = db.db.Exec(`INSERT INTO Channel(network, name, key, detached, detached_internal_msgid, relay_detached, reattach_on, detach_after, detach_on)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
||||
networkID, ch.Name, key, ch.Detached, toNullString(ch.DetachedInternalMsgID), ch.RelayDetached, ch.ReattachOn, detachAfter, ch.DetachOn)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user