Skip to content

Commit

Permalink
Fix sqlite stuck. (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
long2ice committed Nov 26, 2020
1 parent fb6cc62 commit 0bbc471
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 43 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Use `.sql` instead of `.json` to store version file.
- Add `rename` column support MySQL5.
- Remove callable detection for defaults. (#87)
- Fix `sqlite` stuck. (#90)

## 0.3

Expand Down
3 changes: 2 additions & 1 deletion aerich/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def wrapper(*args, **kwargs):
loop = asyncio.get_event_loop()
ctx = args[0]
loop.run_until_complete(f(*args, **kwargs))
loop.run_until_complete(Tortoise.close_connections())
app = ctx.obj.get("app")
if app:
Migrate.remove_old_model_file(app, ctx.obj["location"])
Expand Down Expand Up @@ -282,7 +283,7 @@ async def init_db(ctx: Context, safe):
"upgrade": [schema],
}
write_version_file(os.path.join(dirname, version), content)
return click.secho(f'Success generate schema for app "{app}"', fg=Color.green)
click.secho(f'Success generate schema for app "{app}"', fg=Color.green)


def main():
Expand Down
84 changes: 42 additions & 42 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0bbc471

Please sign in to comment.