hotfix some sqlalchemy models

This commit is contained in:
Georges-Antoine Assi
2024-12-09 19:21:00 -05:00
parent 530e7ddb57
commit d172f2f3ef
2 changed files with 7 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ class Platform(BaseModel):
)
aspect_ratio: Mapped[str] = mapped_column(
String, server_default=DEFAULT_COVER_ASPECT_RATIO
String(length=10), server_default=DEFAULT_COVER_ASPECT_RATIO
)
# This runs a subquery to get the count of roms for the platform

View File

@@ -13,6 +13,7 @@ from sqlalchemy import (
DateTime,
Enum,
ForeignKey,
Index,
Integer,
String,
Text,
@@ -43,6 +44,11 @@ class Rom(BaseModel):
sgdb_id: Mapped[int | None]
moby_id: Mapped[int | None]
__table_args__ = (
Index("idx_roms_igdb_id", "igdb_id"),
Index("idx_roms_moby_id", "moby_id"),
)
file_name: Mapped[str] = mapped_column(String(length=450))
file_name_no_tags: Mapped[str] = mapped_column(String(length=450))
file_name_no_ext: Mapped[str] = mapped_column(String(length=450))