Return false when checking if column exists, if the table does not exist with postgres.

This commit is contained in:
JoramWilander
2015-09-18 08:07:31 -04:00
parent c717fcb325
commit 432753bb4d

View File

@@ -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())