diff --git a/.github/workflows/api-v1-production-build.yml b/.github/workflows/api-v1-production-build.yml index 02e534ce24..4b394599e9 100644 --- a/.github/workflows/api-v1-production-build.yml +++ b/.github/workflows/api-v1-production-build.yml @@ -47,7 +47,7 @@ jobs: timeout-minutes: 30 services: postgres: - image: postgres:13 + image: postgres:18 credentials: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/api-v2-production-build.yml b/.github/workflows/api-v2-production-build.yml index fe25f6604d..0611f100e8 100644 --- a/.github/workflows/api-v2-production-build.yml +++ b/.github/workflows/api-v2-production-build.yml @@ -18,7 +18,7 @@ jobs: timeout-minutes: 30 services: postgres: - image: postgres:13 + image: postgres:18 credentials: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/check-prisma-migrations.yml b/.github/workflows/check-prisma-migrations.yml index 3bee03151b..bddb9fd84e 100644 --- a/.github/workflows/check-prisma-migrations.yml +++ b/.github/workflows/check-prisma-migrations.yml @@ -11,7 +11,7 @@ jobs: runs-on: blacksmith-2vcpu-ubuntu-2404 services: postgres: - image: postgres:13 + image: postgres:18 credentials: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/e2e-api-v2.yml b/.github/workflows/e2e-api-v2.yml index 5c05003be7..cbee6ae91a 100644 --- a/.github/workflows/e2e-api-v2.yml +++ b/.github/workflows/e2e-api-v2.yml @@ -36,7 +36,7 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 services: postgres: - image: postgres:13 + image: postgres:18 credentials: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/e2e-app-store.yml b/.github/workflows/e2e-app-store.yml index a89e2e9124..a8422e68d0 100644 --- a/.github/workflows/e2e-app-store.yml +++ b/.github/workflows/e2e-app-store.yml @@ -48,7 +48,7 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 services: postgres: - image: postgres:13 + image: postgres:18 credentials: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/e2e-embed-react.yml b/.github/workflows/e2e-embed-react.yml index e6dc9baabe..d76a18aafd 100644 --- a/.github/workflows/e2e-embed-react.yml +++ b/.github/workflows/e2e-embed-react.yml @@ -48,7 +48,7 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 services: postgres: - image: postgres:13 + image: postgres:18 credentials: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/e2e-embed.yml b/.github/workflows/e2e-embed.yml index 3ae85bdd5a..12682bc614 100644 --- a/.github/workflows/e2e-embed.yml +++ b/.github/workflows/e2e-embed.yml @@ -48,7 +48,7 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 services: postgres: - image: postgres:13 + image: postgres:18 credentials: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9d6f702179..1dc4b10e2c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -48,7 +48,7 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 services: postgres: - image: postgres:13 + image: postgres:18 credentials: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7f8b5b83b6..a67e2e9984 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -48,7 +48,7 @@ jobs: runs-on: blacksmith-2vcpu-ubuntu-2404 services: postgres: - image: postgres:13 + image: postgres:18 credentials: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/setup-db.yml b/.github/workflows/setup-db.yml index b0667355b6..22d41cb5c1 100644 --- a/.github/workflows/setup-db.yml +++ b/.github/workflows/setup-db.yml @@ -30,7 +30,7 @@ jobs: timeout-minutes: 15 services: postgres: - image: postgres:13 + image: postgres:18 credentials: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/apps/api/v1/test/docker-compose.yml b/apps/api/v1/test/docker-compose.yml index de160dc7d9..249ac4df98 100644 --- a/apps/api/v1/test/docker-compose.yml +++ b/apps/api/v1/test/docker-compose.yml @@ -1,7 +1,7 @@ # The containers that compose the project services: db: - image: postgres:13 + image: postgres:18 restart: always container_name: integration-tests-prisma ports: diff --git a/apps/web/test/docker-compose.yml b/apps/web/test/docker-compose.yml index de160dc7d9..249ac4df98 100644 --- a/apps/web/test/docker-compose.yml +++ b/apps/web/test/docker-compose.yml @@ -1,7 +1,7 @@ # The containers that compose the project services: db: - image: postgres:13 + image: postgres:18 restart: always container_name: integration-tests-prisma ports: diff --git a/packages/features/bookings/repositories/BookingRepository.ts b/packages/features/bookings/repositories/BookingRepository.ts index e336f70d6a..a373b99a83 100644 --- a/packages/features/bookings/repositories/BookingRepository.ts +++ b/packages/features/bookings/repositories/BookingRepository.ts @@ -1514,7 +1514,11 @@ export class BookingRepository implements IBookingRepository { `; } - return totalBookingTime.totalMinutes ?? 0; + // PostgreSQL 16+ returns `numeric` type from EXTRACT(EPOCH FROM ...) instead of `double precision`. + // Prisma maps `numeric` to a JavaScript Decimal object, which causes string concatenation + // instead of numeric addition when used with the `+` operator (e.g., Decimal(30) + 30 = "3030"). + // Explicitly convert to a plain number to ensure correct arithmetic in all callers. + return Number(totalBookingTime.totalMinutes ?? 0); } async findOriginalRescheduledBookingUserId({ rescheduleUid }: { rescheduleUid: string }) { diff --git a/packages/prisma/docker-compose.yml b/packages/prisma/docker-compose.yml index ffb00efd38..9b21817d6c 100644 --- a/packages/prisma/docker-compose.yml +++ b/packages/prisma/docker-compose.yml @@ -1,8 +1,8 @@ # this file is a helper to run Cal.com locally -# starts a postgres instance on port 5450 to use as a local db +# starts a postgres 18 instance on port 5450 to use as a local db services: postgres: - image: postgres:13 + image: postgres:18 ports: - "5450:5432" # expose pg on port 5450 to not collide with pg from elsewhere restart: always