Fix init db sql error

This commit is contained in:
long2ice 2020-05-25 18:53:34 +08:00
parent 40c0008e6e
commit 95e41720cb
2 changed files with 4 additions and 2 deletions

View File

@ -4,9 +4,11 @@ ChangeLog
0.1 0.1
=== ===
0.1.8 0.1.8
_____ -----
- Fix upgrade error when migrate. - Fix upgrade error when migrate.
- Fix init db sql error.
0.1.7 0.1.7
----- -----

View File

@ -218,7 +218,7 @@ async def init_db(ctx: Context, safe):
await Aerich.create(version=version, app=app) await Aerich.create(version=version, app=app)
with open(os.path.join(dirname, version), "w") as f: with open(os.path.join(dirname, version), "w") as f:
content = { content = {
"upgrade": schema, "upgrade": [schema],
} }
json.dump(content, f, ensure_ascii=False, indent=2) json.dump(content, f, ensure_ascii=False, indent=2)
return click.secho(f'Success generate schema for app "{app}"', fg=Color.green) return click.secho(f'Success generate schema for app "{app}"', fg=Color.green)