Automated Action 538a985c8e Build e-commerce API with FastAPI and SQLite
Create a complete e-commerce application with the following features:
- User authentication and authorization
- Product and category management
- Shopping cart functionality
- Order processing
- Database migrations with Alembic
- Comprehensive documentation
2025-05-26 11:05:27 +00:00

13 lines
257 B
Python

from app.db.base import Base
from app.db.session import engine
def init_db() -> None:
# Create tables if they don't exist
Base.metadata.create_all(bind=engine)
def drop_db() -> None:
# Drop all tables
Base.metadata.drop_all(bind=engine)