UUID handling: I kept Uuid in mapped_column() assuming it's a custom SQLAlchemy type. The Python-side type is UUID from the standard library. If you're using SQLAlchemy 2.0's built-in UUID support, you might use:
python
from sqlalchemy import Uuid as SQLUuid # SQLAlchemy's UUID type
TSI_User_Info_id: Mapped[UUID] = mapped_column(SQLUuid, primary_key=True, server_default=func.uuid_generate_v4())
nullable=False is now implicit: With Mapped[str] (without Optional), columns are non-nullable by default. This matches your original schema where all fields except the primary key had nullable=False.
String lengths: I preserved the String(255) and String(50) specifications in mapped_column(). While SQLAlchemy can infer the base type from Mapped[str], the length constraint still needs to be specified explicitly.
Timestamps: Using Mapped[datetime] with TIMESTAMP gives you proper Python datetime objects with type safety.
Relationships: The relationship now has proper type annotation (Mapped[list["ProductMaker"]]), which helps IDEs and type checkers understand the relationship structure.
Alternative approach for nullable fields:
If you later need nullable fields, you'd use:
python
from typing import Optional
optional_field: Mapped[Optional[str]] = mapped_column(String(255))
This conversion gives you better type safety and IDE support while maintaining the exact same database schema. The migration is straightforward and worth doing, especially if you're actively developing this codebase.