diff --git a/CHANGELOG.md b/CHANGELOG.md index a11bf7e..c6d7a0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.7 +### 0.7.1rc1 + +- Fix postgres sql error (#263) + ### 0.7.0 **Now aerich use `.py` file to record versions.** diff --git a/aerich/migrate.py b/aerich/migrate.py index 616f976..c708e59 100644 --- a/aerich/migrate.py +++ b/aerich/migrate.py @@ -125,8 +125,8 @@ async def _generate_diff_py(cls, name): version_file = Path(cls.migrate_location, version) content = MIGRATE_TEMPLATE.format( - upgrade_sql=",\n ".join(map(lambda x: f'"""{x}"""', cls.upgrade_operators)), - downgrade_sql=",\n ".join(map(lambda x: f'"""{x}"""', cls.downgrade_operators)), + upgrade_sql=",\n ".join(map(lambda x: f"'{x}'", cls.upgrade_operators)), + downgrade_sql=",\n ".join(map(lambda x: f"'{x}'", cls.downgrade_operators)), ) with open(version_file, "w", encoding="utf-8") as f: f.write(content) diff --git a/aerich/version.py b/aerich/version.py index 364e7ba..671a509 100644 --- a/aerich/version.py +++ b/aerich/version.py @@ -1 +1 @@ -__version__ = "0.6.4" +__version__ = "0.7.1rc1" diff --git a/pyproject.toml b/pyproject.toml index 060cd36..fa3b3b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aerich" -version = "0.7.0" +version = "0.7.1rc1" description = "A database migrations tool for Tortoise ORM." authors = ["long2ice "] license = "Apache-2.0"