Skip to content

Commit

Permalink
Try to update SQL schema only on supported RDBMS
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyshch committed Sep 28, 2023
1 parent f2552fa commit 7309f9f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ejabberd_sql_schema.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down

0 comments on commit 7309f9f

Please sign in to comment.