24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-07-02 23:06:21 +02:00

Fix compatibility with OTP < 23 in ejabberd_sql_schema

This commit is contained in:
Alexey Shchepin 2023-09-28 05:46:36 +03:00
parent dbbbd49522
commit 9264f2bcdd

View File

@ -200,7 +200,7 @@ find_index_name(Host, Table, Columns) ->
end. end.
get_version(Host, Module) -> get_version(Host, Module) ->
SModule = atom_to_binary(Module), SModule = misc:atom_to_binary(Module),
ejabberd_sql:sql_query( ejabberd_sql:sql_query(
Host, Host,
?SQL("select @(version)d" ?SQL("select @(version)d"
@ -208,7 +208,7 @@ get_version(Host, Module) ->
" where module=%(SModule)s")). " where module=%(SModule)s")).
store_version(Host, Module, Version) -> store_version(Host, Module, Version) ->
SModule = atom_to_binary(Module), SModule = misc:atom_to_binary(Module),
?SQL_UPSERT( ?SQL_UPSERT(
Host, Host,
"schema_version", "schema_version",