diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-09-18 09:30:25 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-09-18 09:30:25 -0400 |
commit | 151849d536a479b9952ee96fa3dccbac6a0711e7 (patch) | |
tree | 57f9a93f90a3cda72ba5389b1d2a0723e40016d5 /store | |
parent | c717fcb325b46438a438c4d0e0a7864ad742a036 (diff) | |
parent | 432753bb4de04a66a15027356017fdb1dcc626fa (diff) | |
download | chat-151849d536a479b9952ee96fa3dccbac6a0711e7.tar.gz chat-151849d536a479b9952ee96fa3dccbac6a0711e7.tar.bz2 chat-151849d536a479b9952ee96fa3dccbac6a0711e7.zip |
Merge pull request #712 from mattermost/postgres-oauth-fix
With Postgres return false when checking if column exists, if the table does not exist.
Diffstat (limited to 'store')
-rw-r--r-- | store/sql_store.go | 4 |
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()) |