Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Check sqlite database file exists before porting. (#14692)
Browse files Browse the repository at this point in the history
To avoid creating an empty SQLite file if the given path
is incorrect.
  • Loading branch information
JeyRathnam authored Dec 22, 2022
1 parent 14abf22 commit 5c9be9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/14692.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Check that the SQLite database file exists before porting to PostgreSQL.
2 changes: 1 addition & 1 deletion synapse/_scripts/synapse_port_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ def main() -> None:
sqlite_config = {
"name": "sqlite3",
"args": {
"database": args.sqlite_database,
"database": "file:{}?mode=rw".format(args.sqlite_database),
"cp_min": 1,
"cp_max": 1,
"check_same_thread": False,
Expand Down

0 comments on commit 5c9be9c

Please sign in to comment.