mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Return false when checking if column exists, if the table does not exist with postgres.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user