mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-11-15 22:42:35 +01:00
Don't use transaction for querying values
This commit is contained in:
parent
6a42de73d1
commit
064b5b8fed
1 changed files with 2 additions and 2 deletions
|
@ -10,8 +10,8 @@ func init() {
|
|||
// SQLite doesn't support constraint updates, but it isn't that careful with constraints anyway.
|
||||
return nil
|
||||
}
|
||||
res, _ := tx.Query(`SELECT EXISTS(SELECT constraint_name FROM information_schema.table_constraints
|
||||
WHERE table_name='message' AND constraint_name='message_chat_jid_fkey');`)
|
||||
res, _ := ctx.db.Query(`SELECT EXISTS(SELECT constraint_name FROM information_schema.table_constraints
|
||||
WHERE table_name='message' AND constraint_name='message_chat_jid_fkey')`)
|
||||
var exists bool
|
||||
_ = res.Scan(&exists)
|
||||
if exists {
|
||||
|
|
Loading…
Reference in a new issue