mirror of
https://github.com/rommapp/romm.git
synced 2026-06-27 22:35:57 +00:00
fix migration
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""Fix sibling_roms view to exclude empty fs_name_no_tags from matching
|
||||
|
||||
Revision ID: 0071_sibling_roms_nonempty_fs_name
|
||||
Revision ID: 0071_sibling_roms_fs_name
|
||||
Revises: 0070_ss_age_ratings
|
||||
Create Date: 2026-03-08 22:45:44.767000
|
||||
|
||||
@@ -12,7 +12,7 @@ from alembic import op
|
||||
from utils.database import is_postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "0071_sibling_roms_nonempty_fs_name"
|
||||
revision = "0071_sibling_roms_fs_name"
|
||||
down_revision = "0070_ss_age_ratings"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
@@ -30,7 +30,7 @@ from sqlalchemy.orm import (
|
||||
noload,
|
||||
selectinload,
|
||||
)
|
||||
from sqlalchemy.sql.elements import KeyedColumnElement
|
||||
from sqlalchemy.sql.elements import ColumnElement
|
||||
from sqlalchemy.sql.selectable import Select
|
||||
|
||||
from config import ROMM_DB_DRIVER
|
||||
@@ -99,7 +99,9 @@ STRIP_ARTICLES_REGEX = r"^(the|a|an)\s+"
|
||||
|
||||
|
||||
def _create_metadata_id_case(
|
||||
prefix: str, id_column: KeyedColumnElement, platform_id_column: KeyedColumnElement
|
||||
prefix: str,
|
||||
id_column: ColumnElement,
|
||||
platform_id_column: ColumnElement,
|
||||
):
|
||||
return case(
|
||||
(
|
||||
@@ -693,9 +695,7 @@ class DBRomsHandler(DBBaseHandler):
|
||||
),
|
||||
_create_metadata_id_case(
|
||||
"fs",
|
||||
func.nullif(
|
||||
base_subquery.c.fs_name_no_tags, ""
|
||||
),
|
||||
func.nullif(base_subquery.c.fs_name_no_tags, ""),
|
||||
base_subquery.c.platform_id,
|
||||
),
|
||||
_create_metadata_id_case(
|
||||
|
||||
Reference in New Issue
Block a user