mirror of
https://github.com/rommapp/romm.git
synced 2026-02-19 07:50:57 +01:00
hotfix some sqlalchemy models
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user