Check sqlite database file exists before porting. (#14692)

To avoid creating an empty SQLite file if the given path
is incorrect.
This commit is contained in:
Jeyachandran Rathnam 2022-12-22 13:26:37 -05:00 committed by GitHub
parent 14abf22dd6
commit 5c9be9c760
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/14692.misc Normal file
View file

@ -0,0 +1 @@
Check that the SQLite database file exists before porting to PostgreSQL.

View file

@ -1307,7 +1307,7 @@ def main() -> None:
sqlite_config = { sqlite_config = {
"name": "sqlite3", "name": "sqlite3",
"args": { "args": {
"database": args.sqlite_database, "database": "file:{}?mode=rw".format(args.sqlite_database),
"cp_min": 1, "cp_min": 1,
"cp_max": 1, "cp_max": 1,
"check_same_thread": False, "check_same_thread": False,