Improved database

This commit is contained in:
Sven Heidemann 2021-11-30 15:13:36 +01:00
parent 14ecc46d92
commit 61101eb576
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class Gismo(ApplicationABC):
async def main(self):
try:
self._logger.trace(__name__, f'Try to start {BotService}')
# await self._bot.start_async()
await self._bot.start_async()
except Exception as e:
self._logger.error(__name__, 'Start failed', e)

View File

@ -15,7 +15,7 @@ class DBContext(DatabaseContext):
def connect(self, database_settings: DatabaseSettings):
try:
self._logger.debug(__name__, "Connecting to database")
super(DatabaseContext, self).connect(database_settings)
super(DBContext, self).connect(database_settings)
self._logger.info(__name__, "Connected to database")
except Exception as e:
self._logger.fatal(__name__, "Connecting to database failed", e)

View File

@ -39,7 +39,7 @@ class User(TableABC):
`DiscordId` INT(30) NOT NULL,
`XP` INT(30) NOT NULL DEFAULT 0,
`ServerId` INT(30),
FOREIGN KEY (`UserId`) REFERENCES Server(`ServerId`),
FOREIGN KEY (`UserId`) REFERENCES Servers(`ServerId`),
PRIMARY KEY(`UserId`)
);
""")