Skip to content

Commit

Permalink
Fixed unnecessary import. (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
long2ice committed Dec 29, 2020
1 parent 78a15f9 commit 530e7cf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.4

### 0.4.4

- Fixed unnecessary import. (#113)

### 0.4.3

- Replace migrations separator to sql standard comment.
Expand Down
2 changes: 1 addition & 1 deletion aerich/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.3"
__version__ = "0.4.4"
3 changes: 1 addition & 2 deletions aerich/inspectdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from ddlparse import DdlParse
from tortoise import BaseDBAsyncClient
from tortoise.backends.mysql.client import MySQLSchemaGenerator


class InspectDb:
Expand All @@ -24,7 +23,7 @@ def __init__(self, conn: BaseDBAsyncClient, tables: Optional[List[str]] = None):
self.DIALECT = conn.schema_generator.DIALECT

async def show_create_tables(self):
if self.DIALECT == MySQLSchemaGenerator.DIALECT:
if self.DIALECT == "mysql":
if not self.tables:
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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aerich"
version = "0.4.3"
version = "0.4.4"
description = "A database migrations tool for Tortoise ORM."
authors = ["long2ice <long2ice@gmail.com>"]
license = "Apache-2.0"
Expand Down

0 comments on commit 530e7cf

Please sign in to comment.