mirror of
https://github.com/mattermost/focalboard.git
synced 2025-01-23 18:34:02 +02:00
Add table_schema filter when checking for migrations table shape (#4717)
This commit is contained in:
parent
7fd923b213
commit
acc9750d97
@ -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…
x
Reference in New Issue
Block a user