mirror of
https://github.com/rommapp/romm.git
synced 2026-03-03 02:27:00 +00:00
move group_id coalesce into partition_by
This commit is contained in:
@@ -484,62 +484,59 @@ class DBRomsHandler(DBBaseHandler):
|
||||
base_subquery.c.id == RomUser.rom_id, RomUser.user_id == user_id
|
||||
),
|
||||
)
|
||||
.add_columns(
|
||||
func.coalesce(
|
||||
func.concat(
|
||||
"igdb-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.igdb_id,
|
||||
),
|
||||
func.concat(
|
||||
"ss-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.ss_id,
|
||||
),
|
||||
func.concat(
|
||||
"moby-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.moby_id,
|
||||
),
|
||||
func.concat(
|
||||
"ra-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.ra_id,
|
||||
),
|
||||
func.concat(
|
||||
"hasheous-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.hasheous_id,
|
||||
),
|
||||
func.concat(
|
||||
"launchbox-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.launchbox_id,
|
||||
),
|
||||
func.concat(
|
||||
"tgdb-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.tgdb_id,
|
||||
),
|
||||
func.concat(
|
||||
"romm-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.id,
|
||||
),
|
||||
).label("group_id")
|
||||
)
|
||||
.add_columns(
|
||||
func.row_number()
|
||||
.over(
|
||||
partition_by=text("group_id"),
|
||||
partition_by=func.coalesce(
|
||||
func.concat(
|
||||
"igdb-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.igdb_id,
|
||||
),
|
||||
func.concat(
|
||||
"ss-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.ss_id,
|
||||
),
|
||||
func.concat(
|
||||
"moby-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.moby_id,
|
||||
),
|
||||
func.concat(
|
||||
"ra-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.ra_id,
|
||||
),
|
||||
func.concat(
|
||||
"hasheous-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.hasheous_id,
|
||||
),
|
||||
func.concat(
|
||||
"launchbox-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.launchbox_id,
|
||||
),
|
||||
func.concat(
|
||||
"tgdb-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.tgdb_id,
|
||||
),
|
||||
func.concat(
|
||||
"romm-",
|
||||
base_subquery.c.platform_id,
|
||||
"-",
|
||||
base_subquery.c.id,
|
||||
),
|
||||
),
|
||||
order_by=[
|
||||
is_main_sibling_order,
|
||||
base_subquery.c.fs_name_no_ext.asc(),
|
||||
|
||||
@@ -9,7 +9,7 @@ services:
|
||||
env_file: .env
|
||||
environment:
|
||||
- REDIS_HOST=romm-valkey-dev
|
||||
- DB_HOST=romm-db-dev
|
||||
- DB_HOST=${DB_HOST:-romm-db-dev}
|
||||
- ROMM_BASE_PATH=/app/romm
|
||||
ports:
|
||||
- "3000:3000" # Frontend dev server
|
||||
@@ -42,7 +42,7 @@ services:
|
||||
volumes:
|
||||
- romm-db-dev:/var/lib/mysql
|
||||
ports:
|
||||
- "${DB_PORT:-3306}:3306"
|
||||
- "3306:3306"
|
||||
|
||||
romm-valkey-dev:
|
||||
image: valkey/valkey:8
|
||||
@@ -58,9 +58,9 @@ services:
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-authentik}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWD:-postgres}
|
||||
POSTGRES_USER: ${DB_USER:-postgres}
|
||||
POSTGRES_DB: ${DB_NAME:-authentik}
|
||||
volumes:
|
||||
- postgres-db:/var/lib/postgresql/data
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user