
- Created main.py with FastAPI app, CORS configuration, and basic endpoints - Added requirements.txt with necessary dependencies - Set up app directory structure with proper organization - Implemented base URL endpoint with app info and documentation links - Added health check endpoint that reports application and database status - Configured CORS to allow all origins - Set up Alembic for database migrations with proper SQLite configuration - Updated README with comprehensive project documentation
28 lines
788 B
Python
28 lines
788 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Validation script to ensure Alembic setup is correct
|
|
"""
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Add project root to path
|
|
sys.path.insert(0, str(Path(__file__).parent))
|
|
|
|
try:
|
|
# Test imports
|
|
from app.db.base import Base
|
|
from app.models.todo import Todo
|
|
from migrations.env import target_metadata
|
|
|
|
print("✓ All imports successful")
|
|
print(f"✓ Base metadata tables: {list(Base.metadata.tables.keys())}")
|
|
print(f"✓ Target metadata tables: {list(target_metadata.tables.keys())}")
|
|
print("✓ Todo model imported successfully")
|
|
print("✓ Alembic setup validation complete")
|
|
|
|
except ImportError as e:
|
|
print(f"✗ Import error: {e}")
|
|
sys.exit(1)
|
|
except Exception as e:
|
|
print(f"✗ Error: {e}")
|
|
sys.exit(1) |