Support multiple databases. (#68)

This commit is contained in:
long2ice
2020-10-28 17:02:02 +08:00
parent bb929f2b55
commit 724379700e
8 changed files with 142 additions and 54 deletions

View File

@@ -1 +1 @@
__version__ = "0.3.2"
__version__ = "0.3.3"

View File

@@ -66,8 +66,6 @@ async def cli(ctx: Context, config, app, name):
tortoise_config = get_tortoise_config(ctx, tortoise_orm)
app = app or list(tortoise_config.get("apps").keys())[0]
if "aerich.models" not in tortoise_config.get("apps").get(app).get("models"):
raise UsageError("Check your tortoise config and add aerich.models to it.", ctx=ctx)
ctx.obj["config"] = tortoise_config
ctx.obj["location"] = location
ctx.obj["app"] = app