fix(db): cast uuid to text for MIN() in services dedup query (GRO-364)
fix(db): cast uuid to text for MIN() in services dedup query (GRO-364)
This commit was merged in pull request #196.
This commit is contained in:
@@ -427,7 +427,7 @@ async function seed() {
|
||||
// Deduplicate existing services (keep lowest id per name) before inserting.
|
||||
await db.execute(sql`
|
||||
DELETE FROM services WHERE id NOT IN (
|
||||
SELECT MIN(id) FROM services GROUP BY name
|
||||
SELECT (MIN(id::text))::uuid FROM services GROUP BY name
|
||||
)
|
||||
`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user