Poetry commands#
Init poetry#
poetry init
poetry env remove --all
poetry installTables#
poetry run python - << 'EOF'
from app.adapters.outgoing.database.database import Base
print(Base.metadata.tables)
EOFDB Config url#
poetry run python - << 'EOF'
from decouple import config
print("DATABASE_URL =", config("DATABASE_URL"))
EOFAlembic#
poetry run alembic revision --autogenerate -m "initial schema"
poetry run alembic upgrade head
poetry run alembic currentDisplays Tables#
poetry run python -c "from app.adapters.outgoing.database.database import Base; print(Base.metadata.tables.keys())"–dict_keys([‘assets’, ‘asset_types’, ‘sessions’])
Run app#
poetry run uvicorn app.main:app --reload