Replace database methods with peewee ORM #39

Merged
osilkin98 merged 26 commits from orm-rewrite into master 2020-04-03 23:40:43 +02:00
Showing only changes of commit 8138e71668 - Show all commits

View file

@ -18,12 +18,15 @@ def get_database_connection():
return db return db
database_proxy = DatabaseProxy()
database = get_database_connection() database = get_database_connection()
database_proxy.initialize(database)
class BaseModel(Model): class BaseModel(Model):
class Meta: class Meta:
database = database database = database_proxy
class Channel(BaseModel): class Channel(BaseModel):