mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-27 05:37:15 -05:00
Merge pull request #270 from mattermost/mm-1763
MM-1763 update our postgresql index check to work with 9.2.4+ versions of postgresql
This commit is contained in:
+1
-1
@@ -224,7 +224,7 @@ func (ss SqlStore) CreateFullTextIndexIfNotExists(indexName string, tableName st
|
||||
func (ss SqlStore) createIndexIfNotExists(indexName string, tableName string, columnName string, fullText bool) {
|
||||
|
||||
if utils.Cfg.SqlSettings.DriverName == "postgres" {
|
||||
_, err := ss.GetMaster().SelectStr("SELECT to_regclass($1)", indexName)
|
||||
_, err := ss.GetMaster().SelectStr("SELECT $1::regclass", indexName)
|
||||
// It should fail if the index does not exist
|
||||
if err == nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user