Updates the check for the schema_migrations information (#23032)
The old check was using `sq.Eq`, which replaces its values with strings, and for the case of `table_schema` we want to call a function.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
344e882f04
Коммит
041cbe2d24
@@ -126,7 +126,7 @@ func (s *SQLStore) isSchemaMigrationNeeded() (bool, error) {
|
|||||||
case model.MysqlDBType:
|
case model.MysqlDBType:
|
||||||
query = query.Where(sq.Eq{"TABLE_SCHEMA": s.schemaName})
|
query = query.Where(sq.Eq{"TABLE_SCHEMA": s.schemaName})
|
||||||
case model.PostgresDBType:
|
case model.PostgresDBType:
|
||||||
query = query.Where(sq.Eq{"TABLE_SCHEMA": "current_schema()"})
|
query = query.Where("table_schema = current_schema()")
|
||||||
}
|
}
|
||||||
|
|
||||||
rows, err := query.Query()
|
rows, err := query.Query()
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user