refac
This commit is contained in:
parent
77189664c2
commit
c77b36bdcc
|
@ -8,7 +8,6 @@ from peewee import InterfaceError as PeeWeeInterfaceError
|
||||||
from peewee import PostgresqlDatabase
|
from peewee import PostgresqlDatabase
|
||||||
from playhouse.db_url import connect, parse
|
from playhouse.db_url import connect, parse
|
||||||
from playhouse.shortcuts import ReconnectMixin
|
from playhouse.shortcuts import ReconnectMixin
|
||||||
from playhouse.sqlcipher_ext import SqlCipherDatabase
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
log.setLevel(SRC_LOG_LEVELS["DB"])
|
log.setLevel(SRC_LOG_LEVELS["DB"])
|
||||||
|
@ -52,6 +51,7 @@ def register_connection(db_url):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"DATABASE_PASSWORD is required when using sqlite+sqlcipher:// URLs"
|
"DATABASE_PASSWORD is required when using sqlite+sqlcipher:// URLs"
|
||||||
)
|
)
|
||||||
|
from playhouse.sqlcipher_ext import SqlCipherDatabase
|
||||||
|
|
||||||
# Parse the database path from SQLCipher URL
|
# Parse the database path from SQLCipher URL
|
||||||
# Convert sqlite+sqlcipher:///path/to/db.sqlite to /path/to/db.sqlite
|
# Convert sqlite+sqlcipher:///path/to/db.sqlite to /path/to/db.sqlite
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 7.7 KiB |
Loading…
Reference in New Issue