Fixed unnecessary import. (#113)
This commit is contained in:
		| @@ -2,6 +2,10 @@ | |||||||
|  |  | ||||||
| ## 0.4 | ## 0.4 | ||||||
|  |  | ||||||
|  | ### 0.4.4 | ||||||
|  |  | ||||||
|  | - Fixed unnecessary import. (#113) | ||||||
|  |  | ||||||
| ### 0.4.3 | ### 0.4.3 | ||||||
|  |  | ||||||
| - Replace migrations separator to sql standard comment. | - Replace migrations separator to sql standard comment. | ||||||
|   | |||||||
| @@ -1 +1 @@ | |||||||
| __version__ = "0.4.3" | __version__ = "0.4.4" | ||||||
|   | |||||||
| @@ -3,7 +3,6 @@ from typing import List, Optional | |||||||
|  |  | ||||||
| from ddlparse import DdlParse | from ddlparse import DdlParse | ||||||
| from tortoise import BaseDBAsyncClient | from tortoise import BaseDBAsyncClient | ||||||
| from tortoise.backends.mysql.client import MySQLSchemaGenerator |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class InspectDb: | class InspectDb: | ||||||
| @@ -24,7 +23,7 @@ class InspectDb: | |||||||
|         self.DIALECT = conn.schema_generator.DIALECT |         self.DIALECT = conn.schema_generator.DIALECT | ||||||
|  |  | ||||||
|     async def show_create_tables(self): |     async def show_create_tables(self): | ||||||
|         if self.DIALECT == MySQLSchemaGenerator.DIALECT: |         if self.DIALECT == "mysql": | ||||||
|             if not self.tables: |             if not self.tables: | ||||||
|                 sql_tables = f"SELECT table_name FROM information_schema.tables WHERE table_schema = '{self.conn.database}';"  # nosec: B608 |                 sql_tables = f"SELECT table_name FROM information_schema.tables WHERE table_schema = '{self.conn.database}';"  # nosec: B608 | ||||||
|                 ret = await self.conn.execute_query(sql_tables) |                 ret = await self.conn.execute_query(sql_tables) | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| [tool.poetry] | [tool.poetry] | ||||||
| name = "aerich" | name = "aerich" | ||||||
| version = "0.4.3" | version = "0.4.4" | ||||||
| description = "A database migrations tool for Tortoise ORM." | description = "A database migrations tool for Tortoise ORM." | ||||||
| authors = ["long2ice <long2ice@gmail.com>"] | authors = ["long2ice <long2ice@gmail.com>"] | ||||||
| license = "Apache-2.0" | license = "Apache-2.0" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user