Fixes to get working out of the box
This commit is contained in:
parent
b1b274be57
commit
0b0bf8a673
2 changed files with 6 additions and 4 deletions
|
@ -699,7 +699,8 @@ class GPTBot:
|
|||
self.matrix_client.store = matrix_store(
|
||||
self.matrix_client.user_id,
|
||||
self.matrix_client.device_id,
|
||||
self.crypto_store_path or "",
|
||||
'.', #store path
|
||||
database_name=self.crypto_store_path or "",
|
||||
)
|
||||
|
||||
self.matrix_client.olm = Olm(
|
||||
|
|
|
@ -2,7 +2,8 @@ from collections import OrderedDict
|
|||
from typing import Optional
|
||||
from importlib import import_module
|
||||
|
||||
from duckdb import DuckDBPyConnection
|
||||
from peewee import SqliteDatabase
|
||||
|
||||
|
||||
MAX_MIGRATION = 8
|
||||
|
||||
|
@ -11,7 +12,7 @@ MIGRATIONS = OrderedDict()
|
|||
for i in range(1, MAX_MIGRATION + 1):
|
||||
MIGRATIONS[i] = import_module(f".migration_{i}", __package__).migration
|
||||
|
||||
def get_version(db: DuckDBPyConnection) -> int:
|
||||
def get_version(db: SqliteDatabase) -> int:
|
||||
"""Get the current database version.
|
||||
|
||||
Args:
|
||||
|
@ -26,7 +27,7 @@ def get_version(db: DuckDBPyConnection) -> int:
|
|||
except:
|
||||
return 0
|
||||
|
||||
def migrate(db: DuckDBPyConnection, from_version: Optional[int] = None, to_version: Optional[int] = None) -> None:
|
||||
def migrate(db: SqliteDatabase, from_version: Optional[int] = None, to_version: Optional[int] = None) -> None:
|
||||
"""Migrate the database to a specific version.
|
||||
|
||||
Args:
|
||||
|
|
Loading…
Reference in a new issue