From 359525716cbce8097e77ae72a776ac6b90f1a634 Mon Sep 17 00:00:00 2001 From: long2ice Date: Thu, 12 Aug 2021 15:42:54 +0800 Subject: [PATCH] update README.md --- README.md | 1 + aerich/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f2c1e27..94074dc 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,7 @@ You can use `aerich` out of cli by use `Command` class. from aerich import Command command = Command(tortoise_config=config, app='models') +await command.init() await command.migrate('test') ``` diff --git a/aerich/__init__.py b/aerich/__init__.py index 0b874be..ba30abf 100644 --- a/aerich/__init__.py +++ b/aerich/__init__.py @@ -27,7 +27,7 @@ class Command: def __init__( self, tortoise_config: dict, - app: str, + app: str = "models", location: str = "./migrations", src_folder: str = ".", ):