Improved database
This commit is contained in:
		| @@ -21,7 +21,7 @@ class Gismo(ApplicationABC): | |||||||
|     async def main(self): |     async def main(self): | ||||||
|         try: |         try: | ||||||
|             self._logger.trace(__name__, f'Try to start {BotService}') |             self._logger.trace(__name__, f'Try to start {BotService}') | ||||||
|             # await self._bot.start_async() |             await self._bot.start_async() | ||||||
|         except Exception as e: |         except Exception as e: | ||||||
|             self._logger.error(__name__, 'Start failed', e) |             self._logger.error(__name__, 'Start failed', e) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ class DBContext(DatabaseContext): | |||||||
|     def connect(self, database_settings: DatabaseSettings): |     def connect(self, database_settings: DatabaseSettings): | ||||||
|         try: |         try: | ||||||
|             self._logger.debug(__name__, "Connecting to database") |             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") |             self._logger.info(__name__, "Connected to database") | ||||||
|         except Exception as e: |         except Exception as e: | ||||||
|             self._logger.fatal(__name__, "Connecting to database failed", e) |             self._logger.fatal(__name__, "Connecting to database failed", e) | ||||||
|   | |||||||
| @@ -39,7 +39,7 @@ class User(TableABC): | |||||||
|                 `DiscordId` INT(30) NOT NULL, |                 `DiscordId` INT(30) NOT NULL, | ||||||
|                 `XP` INT(30) NOT NULL DEFAULT 0, |                 `XP` INT(30) NOT NULL DEFAULT 0, | ||||||
|                 `ServerId` INT(30), |                 `ServerId` INT(30), | ||||||
|                 FOREIGN KEY (`UserId`) REFERENCES Server(`ServerId`), |                 FOREIGN KEY (`UserId`) REFERENCES Servers(`ServerId`), | ||||||
|                 PRIMARY KEY(`UserId`) |                 PRIMARY KEY(`UserId`) | ||||||
|             ); |             ); | ||||||
|         """) |         """) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user