Quote the user table table for postgres

Fixes #11
This commit is contained in:
Gary Kramlich
2022-02-14 16:46:42 -06:00
parent c1bdbd80f6
commit 6a688f01b7
2 changed files with 3 additions and 3 deletions

View File

@@ -69,7 +69,7 @@ func (u *User) sessionNonptr() discordgo.Session {
func (u *User) Insert() {
session := u.sessionNonptr()
query := "INSERT INTO user" +
query := "INSERT INTO \"user\"" +
" (mxid, id, management_room, token)" +
" VALUES ($1, $2, $3, $4);"
@@ -84,7 +84,7 @@ func (u *User) Insert() {
func (u *User) Update() {
session := u.sessionNonptr()
query := "UPDATE user SET" +
query := "UPDATE \"user\" SET" +
" id=$1, management_room=$2, token=$3" +
" WHERE mxid=$4;"