fix: postgres sql error (#263)

This commit is contained in:
long2ice 2022-09-23 23:33:49 +08:00
parent 75db7cea60
commit 9da99824fe
4 changed files with 8 additions and 4 deletions

View File

@ -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.**

View File

@ -125,8 +125,8 @@ class Migrate:
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)

View File

@ -1 +1 @@
__version__ = "0.6.4"
__version__ = "0.7.1rc1"

View File

@ -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 <long2ice@gmail.com>"]
license = "Apache-2.0"