Skip to content

Commit 9da9982

Browse files
committed
fix: postgres sql error (#263)
1 parent 75db7ce commit 9da9982

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## 0.7
44

5+
### 0.7.1rc1
6+
7+
- Fix postgres sql error (#263)
8+
59
### 0.7.0
610

711
**Now aerich use `.py` file to record versions.**

aerich/migrate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ async def _generate_diff_py(cls, name):
125125

126126
version_file = Path(cls.migrate_location, version)
127127
content = MIGRATE_TEMPLATE.format(
128-
upgrade_sql=",\n ".join(map(lambda x: f'"""{x}"""', cls.upgrade_operators)),
129-
downgrade_sql=",\n ".join(map(lambda x: f'"""{x}"""', cls.downgrade_operators)),
128+
upgrade_sql=",\n ".join(map(lambda x: f"'{x}'", cls.upgrade_operators)),
129+
downgrade_sql=",\n ".join(map(lambda x: f"'{x}'", cls.downgrade_operators)),
130130
)
131131
with open(version_file, "w", encoding="utf-8") as f:
132132
f.write(content)

aerich/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.6.4"
1+
__version__ = "0.7.1rc1"

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "aerich"
3-
version = "0.7.0"
3+
version = "0.7.1rc1"
44
description = "A database migrations tool for Tortoise ORM."
55
authors = ["long2ice <[email protected]>"]
66
license = "Apache-2.0"

0 commit comments

Comments
 (0)