summaryrefslogtreecommitdiffstats
path: root/store/sql_store.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-09-18 08:07:31 -0400
committerJoramWilander <jwawilander@gmail.com>2015-09-18 08:07:31 -0400
commit432753bb4de04a66a15027356017fdb1dcc626fa (patch)
tree57f9a93f90a3cda72ba5389b1d2a0723e40016d5 /store/sql_store.go
parentc717fcb325b46438a438c4d0e0a7864ad742a036 (diff)
downloadchat-432753bb4de04a66a15027356017fdb1dcc626fa.tar.gz
chat-432753bb4de04a66a15027356017fdb1dcc626fa.tar.bz2
chat-432753bb4de04a66a15027356017fdb1dcc626fa.zip
Return false when checking if column exists, if the table does not exist with postgres.
Diffstat (limited to 'store/sql_store.go')
-rw-r--r--store/sql_store.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/store/sql_store.go b/store/sql_store.go
index c0b3c2021..cf6fae6d4 100644
--- a/store/sql_store.go
+++ b/store/sql_store.go
@@ -144,6 +144,10 @@ func (ss SqlStore) DoesColumnExist(tableName string, columnName string) bool {
)
if err != nil {
+ if err.Error() == "pq: relation \""+strings.ToLower(tableName)+"\" does not exist" {
+ return false
+ }
+
l4g.Critical("Failed to check if column exists %v", err)
time.Sleep(time.Second)
panic("Failed to check if column exists " + err.Error())