| |
| from pydantic import BaseModel, Field |
| from typing import List, Optional, Union, Dict, Any |
|
|
| class MigrationRequest(BaseModel): |
| db_url: str = Field(..., description="The connection string for the target database") |
| db_type: str = Field(..., description="postgres, mysql, or mongodb") |
| |
| |
| |
| migration_query: Optional[str] = None |
| |
| |
| |
| migration_data: Optional[List[Dict[str, Any]]] = None |
| |
| |
| collection_name: Optional[str] = None |
| |
| |
| batch_size: int = 1000 |
|
|
| class MigrationResponse(BaseModel): |
| success: bool |
| rowsProcessed: int |
| errors: Optional[List[str]] = [] |
| duration: str |
| request_id: str |