2020-08-28 09:38:06 -04:00
|
|
|
from mautrix.util.async_db import Database
|
|
|
|
|
|
|
|
from .upgrade import upgrade_table
|
|
|
|
from .user import User
|
|
|
|
from .puppet import Puppet
|
2021-06-03 01:13:00 -04:00
|
|
|
from .stranger import Stranger
|
2020-08-28 09:38:06 -04:00
|
|
|
from .portal import Portal
|
|
|
|
from .message import Message
|
2021-04-06 01:54:21 -04:00
|
|
|
from .media import Media
|
2021-06-30 03:04:25 -04:00
|
|
|
from .receipt import Receipt
|
2021-04-20 20:01:50 -04:00
|
|
|
from .receipt_reaction import ReceiptReaction
|
2022-03-28 18:40:55 -04:00
|
|
|
from .login_credential import LoginCredential
|
2020-08-28 09:38:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
def init(db: Database) -> None:
|
2022-03-28 18:40:55 -04:00
|
|
|
for table in (User, Puppet, Stranger, Portal, Message, Media, Receipt, ReceiptReaction, LoginCredential):
|
2020-08-28 09:38:06 -04:00
|
|
|
table.db = db
|
|
|
|
|
|
|
|
|
2022-03-28 18:40:55 -04:00
|
|
|
__all__ = [
|
|
|
|
"upgrade_table",
|
|
|
|
"User",
|
|
|
|
"Puppet",
|
|
|
|
"Stranger",
|
|
|
|
"Portal",
|
|
|
|
"Message",
|
|
|
|
"Media",
|
|
|
|
"Receipt",
|
|
|
|
"ReceiptReaction",
|
|
|
|
"LoginCredential"
|
|
|
|
]
|