mirror of https://github.com/django/django.git
Refs #34825 -- Made SQLite backend open source database in readonly mode when using spawn.
This commit is contained in:
parent
a5905b164d
commit
2128a73713
|
@ -143,7 +143,7 @@ class DatabaseCreation(BaseDatabaseCreation):
|
|||
f"file:memorydb_{alias}_{_worker_id}?mode=memory&cache=shared"
|
||||
)
|
||||
source_db = self.connection.Database.connect(
|
||||
f"file:{alias}_{_worker_id}.sqlite3", uri=True
|
||||
f"file:{alias}_{_worker_id}.sqlite3?mode=ro", uri=True
|
||||
)
|
||||
target_db = sqlite3.connect(connection_str, uri=True)
|
||||
source_db.backup(target_db)
|
||||
|
|
Loading…
Reference in New Issue