We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4af09c4 commit ff30f9fCopy full SHA for ff30f9f
src/labs/db.py
@@ -35,6 +35,8 @@ async def init_models():
35
References:
36
https://stribny.name/blog/fastapi-asyncalchemy/
37
"""
38
+ import logging
39
+ logging.info("Initialising models")
40
async with engine.begin() as conn:
41
await conn.run_sync(Base.metadata.drop_all)
42
await conn.run_sync(Base.metadata.create_all)
src/pyproject.toml
@@ -32,6 +32,9 @@ bcrypt = "^3.2.2"
32
pytest = "^5.2"
33
watchdog = "^2.1.8"
34
+[tool.poetry.scripts]
+init-db = "labs.db.init_db"
+
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
0 commit comments