fix(db): cast REPEAT count to integer in migration 0017
Prevents implicit type coercion error in some Postgres versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4205007dc2
commit
083ffaa71e
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue