update README.md
This commit is contained in:
parent
7d3eb2e151
commit
359525716c
@ -231,6 +231,7 @@ You can use `aerich` out of cli by use `Command` class.
|
|||||||
from aerich import Command
|
from aerich import Command
|
||||||
|
|
||||||
command = Command(tortoise_config=config, app='models')
|
command = Command(tortoise_config=config, app='models')
|
||||||
|
await command.init()
|
||||||
await command.migrate('test')
|
await command.migrate('test')
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class Command:
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
tortoise_config: dict,
|
tortoise_config: dict,
|
||||||
app: str,
|
app: str = "models",
|
||||||
location: str = "./migrations",
|
location: str = "./migrations",
|
||||||
src_folder: str = ".",
|
src_folder: str = ".",
|
||||||
):
|
):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user