mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +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),
|
process_flag(trap_exit, true),
|
||||||
case sqlite3:open(?SQLITE_DB, [{file, binary_to_list(DB)}]) of
|
case sqlite3:open(?SQLITE_DB, [{file, binary_to_list(DB)}]) of
|
||||||
{ok, Ref} ->
|
{ok, Ref} ->
|
||||||
|
sqlite3:sql_exec(?SQLITE_DB, "pragma foreign_keys = on"),
|
||||||
{ok, Ref};
|
{ok, Ref};
|
||||||
{error, {already_started, Ref}} ->
|
{error, {already_started, Ref}} ->
|
||||||
{ok, Ref};
|
{ok, Ref};
|
||||||
|
@ -143,6 +143,7 @@ check_sqlite_db(DB) ->
|
|||||||
end,
|
end,
|
||||||
case Ret of
|
case Ret of
|
||||||
ok ->
|
ok ->
|
||||||
|
sqlite3:sql_exec(?SQLITE_DB, "pragma foreign_keys = on"),
|
||||||
case sqlite3:list_tables(?SQLITE_DB) of
|
case sqlite3:list_tables(?SQLITE_DB) of
|
||||||
[] ->
|
[] ->
|
||||||
create_sqlite_tables(),
|
create_sqlite_tables(),
|
||||||
|
Loading…
Reference in New Issue
Block a user