```
chore: refactor logging module, update genesis timestamp, remove model relationships, and reorganize routers - Rename logging.py to logger.py and update import paths in poa.py and main.py - Update devnet genesis timestamp to 1766828620 - Remove SQLModel Relationship declarations from Block, Transaction, and Receipt models - Add SessionDep type alias and get_session dependency in coordinator-api deps - Reorganize coordinator-api routers: replace explorer/registry with exchange, users, marketplace
This commit is contained in:
17
apps/coordinator-api/src/app/database.py
Normal file
17
apps/coordinator-api/src/app/database.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""Database configuration for the coordinator API."""
|
||||
|
||||
from sqlmodel import create_engine, SQLModel
|
||||
from sqlalchemy import StaticPool
|
||||
|
||||
# Create in-memory SQLite database for now
|
||||
engine = create_engine(
|
||||
"sqlite:///:memory:",
|
||||
connect_args={"check_same_thread": False},
|
||||
poolclass=StaticPool,
|
||||
echo=False
|
||||
)
|
||||
|
||||
|
||||
def create_db_and_tables():
|
||||
"""Create database and tables"""
|
||||
SQLModel.metadata.create_all(engine)
|
||||
Reference in New Issue
Block a user