- B904 (55): add `from err` / `from None` to raise-in-except across 13 files - F821 (1): add missing HTTPException import in routes_language_qc.py - F841 (7): remove unused variable assignments (current_user, job_title, tts_provider, etc.) - W293 (13): strip trailing whitespace from blank lines - C416 (4): rewrite unnecessary dict comprehensions as dict() - C401 (1): rewrite unnecessary generator as set comprehension - E701 (4): split multi-statement lines in cost_tracker.py - E741 (1): rename ambiguous `l` to `lang` in cloud_run_dispatch.py - B007 (4): prefix unused loop variables with _ in tts.py, video_renderer.py - I001 (1): sort imports in tasks/__init__.py (move stdlib to top) - E402 (3): move threading/time/signals imports to top of tasks/__init__.py - UP042 (9): replace (str, Enum) with StrEnum in all model/schema enums Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
626 B
Python
22 lines
626 B
Python
"""Entry point for running migrations: python -m app.migrations.run"""
|
|
import asyncio
|
|
|
|
from app.core.database import close_mongo_connection, connect_to_mongo
|
|
from app.migrations.migrator import MigrationManager
|
|
|
|
|
|
async def main() -> None:
|
|
await connect_to_mongo()
|
|
try:
|
|
mgr = MigrationManager()
|
|
applied = await mgr.migrate_up()
|
|
if applied:
|
|
print(f"Applied {len(applied)} migration(s): {applied}")
|
|
else:
|
|
print("Already up to date — no pending migrations.")
|
|
finally:
|
|
await close_mongo_connection()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|