From 6556a8dd102624785726943aac6ef1317e13274a Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Wed, 26 Apr 2023 22:53:07 +0200 Subject: [PATCH] Fix table_schema check for postgres (#4723) --- server/services/store/sqlstore/schema_table_migration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/services/store/sqlstore/schema_table_migration.go b/server/services/store/sqlstore/schema_table_migration.go index 913a5320c..1347fd986 100644 --- a/server/services/store/sqlstore/schema_table_migration.go +++ b/server/services/store/sqlstore/schema_table_migration.go @@ -127,7 +127,7 @@ func (s *SQLStore) isSchemaMigrationNeeded() (bool, error) { case model.MysqlDBType: query = query.Where(sq.Eq{"TABLE_SCHEMA": s.schemaName}) case model.PostgresDBType: - query = query.Where(sq.Eq{"TABLE_SCHEMA": "current_schema()"}) + query = query.Where("table_schema = current_schema()") } rows, err := query.Query()