mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Enable FOREIGN KEYS by default
This commit is contained in:
parent
2a3a2d9804
commit
bdedcf8d8a
@ -501,6 +501,7 @@ sqlite_connect(DB) ->
|
||||
process_flag(trap_exit, true),
|
||||
case sqlite3:open(?SQLITE_DB, [{file, binary_to_list(DB)}]) of
|
||||
{ok, Ref} ->
|
||||
sqlite3:sql_exec(?SQLITE_DB, "pragma foreign_keys = on"),
|
||||
{ok, Ref};
|
||||
{error, {already_started, Ref}} ->
|
||||
{ok, Ref};
|
||||
|
@ -143,6 +143,7 @@ check_sqlite_db(DB) ->
|
||||
end,
|
||||
case Ret of
|
||||
ok ->
|
||||
sqlite3:sql_exec(?SQLITE_DB, "pragma foreign_keys = on"),
|
||||
case sqlite3:list_tables(?SQLITE_DB) of
|
||||
[] ->
|
||||
create_sqlite_tables(),
|
||||
|
Loading…
Reference in New Issue
Block a user