mirror of
https://github.com/maubot/maubot
synced 2025-09-05 04:50:39 +00:00
Update mautrix-python
This commit is contained in:
parent
61f154876d
commit
8f40a0b292
7 changed files with 12 additions and 9 deletions
|
@ -32,7 +32,11 @@ class Config(BaseFileConfig):
|
|||
def do_update(self, helper: ConfigUpdateHelper) -> None:
|
||||
base = helper.base
|
||||
copy = helper.copy
|
||||
copy("database")
|
||||
|
||||
if "database" in self and self["database"].startswith("sqlite:///"):
|
||||
helper.base["database"] = self["database"].replace("sqlite:///", "sqlite:")
|
||||
else:
|
||||
copy("database")
|
||||
copy("database_opts")
|
||||
if isinstance(self["crypto_database"], dict):
|
||||
if self["crypto_database.type"] == "postgres":
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# The full URI to the database. SQLite and Postgres are fully supported.
|
||||
# Other DBMSes supported by SQLAlchemy may or may not work.
|
||||
# Format examples:
|
||||
# SQLite: sqlite:///filename.db
|
||||
# SQLite: sqlite:filename.db
|
||||
# Postgres: postgresql://username:password@hostname/dbname
|
||||
database: sqlite:///maubot.db
|
||||
database: sqlite:maubot.db
|
||||
|
||||
# Separate database URL for the crypto database. "default" means use the same database as above.
|
||||
crypto_database: default
|
||||
|
|
|
@ -317,7 +317,7 @@ class PluginInstance(DBInstance):
|
|||
)
|
||||
else:
|
||||
self.inst_db = Database.create(
|
||||
f"sqlite:///{self._sqlite_db_path}",
|
||||
f"sqlite:{self._sqlite_db_path}",
|
||||
upgrade_table=upgrade_table,
|
||||
log=instance_db_log,
|
||||
)
|
||||
|
|
|
@ -35,7 +35,7 @@ server:
|
|||
|
||||
# The database for the plugin. Used for plugin data, the sync token and e2ee data (if enabled).
|
||||
# SQLite and Postgres are supported.
|
||||
database: sqlite:///bot.db
|
||||
database: sqlite:bot.db
|
||||
|
||||
# Additional arguments for asyncpg.create_pool() or sqlite3.connect()
|
||||
# https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue