1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-21 13:38:56 +02:00

Merge pull request #4641 from sbishel/MM-51303-add-schema-check

Add  schema check for schema migration
This commit is contained in:
Scott Bishel 2023-03-14 12:58:14 -06:00 committed by GitHub
commit 5310193fa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,6 +123,10 @@ func (s *SQLStore) isSchemaMigrationNeeded() (bool, error) {
"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))