mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-21 13:38:56 +02:00
Fix table_schema check for postgres (#4724)
This commit is contained in:
parent
55ba9d8624
commit
df5456adc0
@ -123,6 +123,13 @@ func (s *SQLStore) isSchemaMigrationNeeded() (bool, error) {
|
||||
"TABLE_NAME": s.tablePrefix + "schema_migrations",
|
||||
})
|
||||
|
||||
switch s.dbType {
|
||||
case model.MysqlDBType:
|
||||
query = query.Where(sq.Eq{"TABLE_SCHEMA": s.schemaName})
|
||||
case model.PostgresDBType:
|
||||
query = query.Where("table_schema = current_schema()")
|
||||
}
|
||||
|
||||
rows, err := query.Query()
|
||||
if err != nil {
|
||||
s.logger.Error("failed to fetch columns in schema_migrations table", mlog.Err(err))
|
||||
|
Loading…
Reference in New Issue
Block a user