sqlmodel migrations command not found in version 0.0.27 #1630
-
| First Check
 Commit to Help
 Example CodeAt this stage, the content of the tables is not important, but I will send them anyway.
from datetime import datetime
from typing import Optional, TYPE_CHECKING
from sqlmodel import SQLModel, Field, Relationship
if TYPE_CHECKING:
    from backend.infrastructure.models.matter import Case
class Contact(SQLModel, table=True):
    id: int = Field(primary_key=True)
    name: str = Field(max_length=100, description='Data')
    personal_info: Optional[str] = Field(default=None, description='Passpotrt', max_length=20)
    phone: Optional[str] = Field(default=None, max_length=20)
    email: Optional[str] = Field(default=None, max_length=50)
    created_at: datetime = Field(default_factory=datetime.now(tz=None)) # type: ignore
    case_id: int = Field(foreign_key='cases.id', index=True)
    # relationships
    case: Optional[Case] = Relationship(back_populates='contacts')DescriptionEnvironment: 
 When following the documentation and trying to run  However, the equivalent Alembic command works correctly: Is the sequence of actions for initializing migrations using SQLModel described accurately enough in the documentation? The fact that alembic executed the command successfully, but SQLModel did not, suggests that I may be doing something wrong. Operating SystemLinux Operating System DetailsUbuntu 24.04.2 LTS SQLModel Version0.0.27 Python Version3.13.3 Additional ContextNo response | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
| 
 Could you please share a link to the page of docs where you found  | 
Beta Was this translation helpful? Give feedback.

The
sqlmodel migrations initcommand has not yet been implemented in the public version and only exists in the development branch. I understand, thank you for the information.