From af4742ae0b5ada98621d3ee6f7ddc2f8f76c44f7 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 30 Nov 2025 20:29:46 +0100 Subject: [PATCH] Fix sqlarr of api (#1188) --- api/shell.nix | 2 +- api/src/db/utils.ts | 2 +- auth/shell.nix | 2 +- docker-compose.dev.yml | 4 ++-- docker-compose.yml | 4 ++-- transcoder/shell.nix | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/shell.nix b/api/shell.nix index 1ec82678..c45fb2b9 100644 --- a/api/shell.nix +++ b/api/shell.nix @@ -4,7 +4,7 @@ pkgs.mkShell { bun biome # for psql to debug from the cli - postgresql_15 + postgresql_18 # to build libvips (for sharp) nodejs node-gyp diff --git a/api/src/db/utils.ts b/api/src/db/utils.ts index e36da34a..6e9c7308 100644 --- a/api/src/db/utils.ts +++ b/api/src/db/utils.ts @@ -83,7 +83,7 @@ export function sqlarr(array: unknown[]): string { ? sqlarr(item) : typeof item === "object" ? `"${JSON.stringify(item).replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"` - : `"${item}"`, + : `"${item?.toString().replaceAll('"', '\\"')}"`, ) .join(", ")}}`; } diff --git a/auth/shell.nix b/auth/shell.nix index 0cf2b1f4..cde66962 100644 --- a/auth/shell.nix +++ b/auth/shell.nix @@ -7,7 +7,7 @@ pkgs.mkShell { sqlc go-swag # for psql in cli (+ pgformatter for sql files) - postgresql_15 + postgresql_18 pgformatter # to run tests hurl diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index b4e04d34..62645643 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -190,12 +190,12 @@ services: - "/var/run/docker.sock:/var/run/docker.sock:ro" postgres: - image: postgres:15 + image: postgres:18 restart: on-failure env_file: - ./.env volumes: - - db:/var/lib/postgresql/data + - db:/var/lib/postgresql ports: - "5432:5432" environment: diff --git a/docker-compose.yml b/docker-compose.yml index 57ee406e..77128f66 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -139,12 +139,12 @@ services: - "/var/run/docker.sock:/var/run/docker.sock:ro" postgres: - image: postgres:15 + image: postgres:18 restart: unless-stopped env_file: - ./.env volumes: - - db:/var/lib/postgresql/data + - db:/var/lib/postgresql environment: - POSTGRES_USER=$PGUSER - POSTGRES_PASSWORD=$PGPASSWORD diff --git a/transcoder/shell.nix b/transcoder/shell.nix index fafc50a7..a90cd539 100644 --- a/transcoder/shell.nix +++ b/transcoder/shell.nix @@ -6,7 +6,7 @@ pkgs.mkShell { go-migrate go-swag # for psql in cli (+ pgformatter for sql files) - postgresql_15 + postgresql_18 pgformatter # to debug video files mediainfo