Stop using SQLAlchemy ORM everywhere
This commit is contained in:
@@ -25,10 +25,9 @@ from .user import User, UserPortal, Contact
|
||||
from .user_profile import UserProfile
|
||||
|
||||
|
||||
def init(db_session, db_engine) -> None:
|
||||
BotChat.query = db_session.query_property()
|
||||
def init(db_engine) -> None:
|
||||
for table in (Portal, Message, User, Contact, UserPortal, Puppet, TelegramFile, UserProfile,
|
||||
RoomState):
|
||||
RoomState, BotChat):
|
||||
table.db = db_engine
|
||||
table.t = table.__table__
|
||||
table.c = table.t.c
|
||||
|
||||
Reference in New Issue
Block a user