Skip to content

The open-source app everyone uses to manage agents at work

fix(db): cast REPEAT count to integer in migration 0017

Forgotten083ffaa71efb
diff --git a/packages/db/src/migrations/0017_tiresome_gabe_jones.sql b/packages/db/src/migrations/0017_tiresome_gabe_jones.sql
index 13973a9a2b..fbfc02dabe 100644
--- a/packages/db/src/migrations/0017_tiresome_gabe_jones.sql
+++ b/packages/db/src/migrations/0017_tiresome_gabe_jones.sql
@@ -16,7 +16,7 @@ WITH ranked_companies AS (
UPDATE companies c
SET issue_prefix = CASE
WHEN ranked_companies.prefix_rank = 1 THEN ranked_companies.base_prefix
- ELSE ranked_companies.base_prefix || REPEAT('A', ranked_companies.prefix_rank - 1)
+ ELSE ranked_companies.base_prefix || REPEAT('A', (ranked_companies.prefix_rank - 1)::integer)
END
FROM ranked_companies
WHERE c.id = ranked_companies.id;--> statement-breakpoint