Scaffold SQLAlchemy models, routers, and Alembic migrations
- app/models/: Printer, Filament, PrintJob, Todo, PricingConfig with full SQLAlchemy 2.x mapped columns and relationships - app/routers/: list + get-by-id endpoints for all five resources - app/db.py: SQLAlchemy engine + SessionLocal + get_db dependency - alembic/: env.py reads MYSQL_* env vars; 0001_initial_schema mirrors db.sql - alembic.ini: script_location configured, URL injected at runtime Since db.sql already created the tables, stamp the DB before running future migrations: alembic stamp head Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
8
app/models/__init__.py
Normal file
8
app/models/__init__.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from app.models.base import Base
|
||||
from app.models.filament import Filament
|
||||
from app.models.pricing import PricingConfig
|
||||
from app.models.print_job import PrintJob
|
||||
from app.models.printer import Printer
|
||||
from app.models.todo import Todo
|
||||
|
||||
__all__ = ["Base", "Printer", "Filament", "PrintJob", "Todo", "PricingConfig"]
|
||||
Reference in New Issue
Block a user