fix: resolve CLI import errors; fix regulatory shadowing; fix blockchain app syntax errors

This commit is contained in:
2026-03-15 10:03:21 +00:00
parent 0a0a8a1e15
commit ee430ebb49
7 changed files with 53 additions and 12 deletions

View File

@@ -7,6 +7,9 @@ from sqlalchemy import event
from .config import settings
# Import all models to ensure they are registered with SQLModel.metadata
from .models import Block, Transaction, Account, Receipt, Escrow # noqa: F401
_engine = create_engine(f"sqlite:///{settings.db_path}", echo=False)
@event.listens_for(_engine, "connect")
@@ -29,3 +32,6 @@ def init_db() -> None:
def session_scope() -> Session:
with Session(_engine) as session:
yield session
# Expose engine for escrow routes
engine = _engine