1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-08 15:06:08 +02:00

Fix schema migration check for postgres (#4661)

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Miguel de la Cruz 2023-03-29 22:13:25 +02:00 committed by GitHub
parent 8de83a1de1
commit ec292f661f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,8 +123,11 @@ func (s *SQLStore) isSchemaMigrationNeeded() (bool, error) {
"TABLE_NAME": s.tablePrefix + "schema_migrations",
})
if s.dbType == model.MysqlDBType {
switch s.dbType {
case model.MysqlDBType:
query = query.Where(sq.Eq{"TABLE_SCHEMA": s.schemaName})
case model.PostgresDBType:
query = query.Where(sq.Eq{"TABLE_SCHEMA": "current_schema()"})
}
rows, err := query.Query()