Spaces:
Configuration error
Configuration error
Download upstream-open-notebook/open_notebook/database/migrate.py from archivartaunik/NotebookLM: direct link, hf CLI and curl.
- Browser
- Download file 811 Bytes
-
https://huggingface.co/spaces/archivartaunik/NotebookLM/resolve/main/upstream-open-notebook/open_notebook/database/migrate.py
- Command line
-
hf download hf://spaces/archivartaunik/NotebookLM/upstream-open-notebook/open_notebook/database/migrate.py
-
curl -L -o migrate.py https://huggingface.co/spaces/archivartaunik/NotebookLM/resolve/main/upstream-open-notebook/open_notebook/database/migrate.py
811 Bytes
| 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()) | |
| 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()) | |