24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-24 22:25:47 +02:00

Try to update SQL schema only on supported RDBMS

This commit is contained in:
Alexey Shchepin 2023-09-28 13:20:09 +03:00
parent f2552faca8
commit 7309f9f88a

View File

@ -658,7 +658,14 @@ create_tables(Host, Module, Schema) ->
store_version(Host, Module, Schema#sql_schema.version).
should_update_schema(Host) ->
case ejabberd_option:update_sql_schema() of
SupportedDB =
case ejabberd_option:sql_type(Host) of
pgsql -> true;
sqlite -> true;
mysql -> true;
_ -> false
end,
case ejabberd_option:update_sql_schema() andalso SupportedDB of
true ->
case ejabberd_sql:use_new_schema() of
true ->