From 432753bb4de04a66a15027356017fdb1dcc626fa Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Fri, 18 Sep 2015 08:07:31 -0400 Subject: Return false when checking if column exists, if the table does not exist with postgres. --- store/sql_store.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'store/sql_store.go') 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()) -- cgit v1.2.3-1-g7c22