Merge pull request #270 from mattermost/mm-1763
MM-1763 update our postgresql index check to work with 9.2.4+ versions of postgresql
Этот коммит содержится в:
@@ -224,7 +224,7 @@ func (ss SqlStore) CreateFullTextIndexIfNotExists(indexName string, tableName st
|
|||||||
func (ss SqlStore) createIndexIfNotExists(indexName string, tableName string, columnName string, fullText bool) {
|
func (ss SqlStore) createIndexIfNotExists(indexName string, tableName string, columnName string, fullText bool) {
|
||||||
|
|
||||||
if utils.Cfg.SqlSettings.DriverName == "postgres" {
|
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
|
// It should fail if the index does not exist
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return
|
return
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user