1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-02-01 19:14:35 +02:00

Fix schema migration check for postgres (#4660)

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

View File

@ -121,8 +121,11 @@ func (s *SQLStore) isSchemaMigrationNeeded() (bool, error) {
"COLUMN_NAME": "dirty",
})
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()"})
}
row := query.QueryRow()