From 041cbe2d24e22ae415511016fe4501d0341f02ca Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Fri, 21 Apr 2023 10:44:52 +0200 Subject: [PATCH] Updates the check for the schema_migrations information (#23032) The old check was using `sq.Eq`, which replaces its values with strings, and for the case of `table_schema` we want to call a function. --- server/boards/services/store/sqlstore/schema_table_migration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/boards/services/store/sqlstore/schema_table_migration.go b/server/boards/services/store/sqlstore/schema_table_migration.go index cdb0f4d628..8ec5f154a9 100644 --- a/server/boards/services/store/sqlstore/schema_table_migration.go +++ b/server/boards/services/store/sqlstore/schema_table_migration.go @@ -126,7 +126,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()