mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-28 19:40:50 +00:00
Creates the API layer for Open Notebook Creates a services API gateway for the Streamlit front-end Migrates the SurrealDB SDK to the official one Change all database calls to async New podcast framework supporting multiple speaker configurations Implement the surreal-commands library for async processing Improve docker image and docker-compose configurations
26 lines
811 B
Python
26 lines
811 B
Python
import asyncio
|
|
|
|
from .async_migrate import AsyncMigrationManager
|
|
|
|
|
|
class MigrationManager:
|
|
"""
|
|
Synchronous wrapper around AsyncMigrationManager for backward compatibility.
|
|
"""
|
|
|
|
def __init__(self):
|
|
"""Initialize with async migration manager."""
|
|
self._async_manager = AsyncMigrationManager()
|
|
|
|
def get_current_version(self) -> int:
|
|
"""Get current database version (sync wrapper)."""
|
|
return asyncio.run(self._async_manager.get_current_version())
|
|
|
|
@property
|
|
def needs_migration(self) -> bool:
|
|
"""Check if migration is needed (sync wrapper)."""
|
|
return asyncio.run(self._async_manager.needs_migration())
|
|
|
|
def run_migration_up(self):
|
|
"""Run migrations (sync wrapper)."""
|
|
asyncio.run(self._async_manager.run_migration_up())
|