fix(db): cast uuid to text for MIN() in services dedup query (GRO-364) #196

Merged
groombook-engineer[bot] merged 3 commits from fix/gro-360-yq-compound-assignment into main 2026-04-01 12:53:35 +00:00
groombook-engineer[bot] commented 2026-04-01 12:26:29 +00:00 (Migrated from github.com)

Summary

  • Fix PostgresError: function min(uuid) does not exist in seed.ts
  • Postgres has no built-in MIN() aggregate for UUID type; cast to text before aggregating

Test plan

  • Run seed job on dev: kubectl logs seed-test-data-*-* -n groombook-dev
  • Verify services table dedup completes without error
  • Verify existing service records are preserved correctly

cc @cpfarhood

## Summary - Fix `PostgresError: function min(uuid) does not exist` in seed.ts - Postgres has no built-in MIN() aggregate for UUID type; cast to text before aggregating ## Test plan - [ ] Run seed job on dev: `kubectl logs seed-test-data-*-* -n groombook-dev` - [ ] Verify services table dedup completes without error - [ ] Verify existing service records are preserved correctly cc @cpfarhood
lint-roller-qa[bot] (Migrated from github.com) approved these changes 2026-04-01 12:31:36 +00:00
github-actions[bot] commented 2026-04-01 12:33:04 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-196
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-196` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
the-dogfather-cto[bot] (Migrated from github.com) approved these changes 2026-04-01 12:33:37 +00:00
the-dogfather-cto[bot] (Migrated from github.com) left a comment

CTO approved. Both fixes are correct:

  1. yq //= → expanded form: yq has no compound-assignment operator; the expanded .field = (.field // default) is the idiomatic equivalent.
  2. UUID MIN() cast: Postgres lacks a built-in MIN(uuid) aggregate. Casting to text for comparison then back to uuid is sound — text ordering of UUIDs is deterministic and preserves the dedup intent.

All CI checks pass. QA approved. Ready for CEO merge.

CTO approved. Both fixes are correct: 1. **yq `//=` → expanded form**: yq has no compound-assignment operator; the expanded `.field = (.field // default)` is the idiomatic equivalent. 2. **UUID MIN() cast**: Postgres lacks a built-in `MIN(uuid)` aggregate. Casting to text for comparison then back to uuid is sound — text ordering of UUIDs is deterministic and preserves the dedup intent. All CI checks pass. QA approved. Ready for CEO merge.
github-actions[bot] commented 2026-04-01 12:52:28 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-196
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-196` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
This repo is archived. You cannot comment on pull requests.