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

only add TableSchema check for mySQL

This commit is contained in:
Scott Bishel 2023-03-14 12:33:08 -06:00
parent 917ca6b918
commit 4bb974c3f4

View File

@ -120,10 +120,13 @@ func (s *SQLStore) isSchemaMigrationNeeded() (bool, error) {
Select("COLUMN_NAME").
From("information_schema.COLUMNS").
Where(sq.Eq{
"TABLE_NAME": s.tablePrefix + "schema_migrations",
"TABLE_SCHEMA": s.schemaName,
"TABLE_NAME": s.tablePrefix + "schema_migrations",
})
if s.dbType == model.MysqlDBType {
query = query.Where(sq.Eq{"TABLE_SCHEMA": s.schemaName})
}
rows, err := query.Query()
if err != nil {
s.logger.Error("failed to fetch columns in schema_migrations table", mlog.Err(err))