fix(render): export INSERT used wrong column + lowercase enum labels (the real 500)
Build backend images / build content-svc (push) Failing after 59s
Build backend images / build file-svc (push) Failing after 48s
Build backend images / build gateway (push) Failing after 59s
Build backend images / build identity-svc (push) Failing after 53s
Build backend images / build notification-svc (push) Failing after 55s
Build backend images / build render-svc (push) Failing after 59s
Build backend images / build studio-svc (push) Failing after 54s
Build backend images / build content-svc (push) Failing after 59s
Build backend images / build file-svc (push) Failing after 48s
Build backend images / build gateway (push) Failing after 59s
Build backend images / build identity-svc (push) Failing after 53s
Build backend images / build notification-svc (push) Failing after 55s
Build backend images / build render-svc (push) Failing after 59s
Build backend images / build studio-svc (push) Failing after 54s
The output-upload-url 500 was NOT the enum cast — it was:
1. INSERT referenced original_project_id; the exports table column is project_id
2. file_type/create_type literals were lowercase ('video'/'render') but the
export_file_type/export_create_type enums are PascalCase ('Video'/'Render')
Verified the corrected INSERT against the live schema. Now real renders produce
a downloadable export instead of completing with export=nil.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -656,14 +656,14 @@ func (s *Store) CreateExportForJob(ctx context.Context, jobID uuid.UUID) (*model
|
|||||||
|
|
||||||
_, err = s.pool.Exec(ctx, `
|
_, err = s.pool.Exec(ctx, `
|
||||||
INSERT INTO render.exports
|
INSERT INTO render.exports
|
||||||
(id, tenant_id, user_id, saved_project_id, original_project_id,
|
(id, tenant_id, user_id, saved_project_id, project_id,
|
||||||
render_job_id, path, file_extension, file_type, render_quality,
|
render_job_id, path, file_extension, file_type, render_quality,
|
||||||
create_type, size_bytes, produce_date, auto_delete_date,
|
create_type, size_bytes, produce_date, auto_delete_date,
|
||||||
delete_notified, created_at)
|
delete_notified, created_at)
|
||||||
VALUES
|
VALUES
|
||||||
($1, $2, $3, $4, $5,
|
($1, $2, $3, $4, $5,
|
||||||
$6, $7, 'mp4', 'video'::render.export_file_type, $8::render.render_quality,
|
$6, $7, 'mp4', 'Video'::render.export_file_type, $8::render.render_quality,
|
||||||
'render'::render.export_create_type, 0, $9, $10,
|
'Render'::render.export_create_type, 0, $9, $10,
|
||||||
false, $9)`,
|
false, $9)`,
|
||||||
exportID, job.TenantID, job.UserID, job.SavedProjectID, job.OriginalProjectID,
|
exportID, job.TenantID, job.UserID, job.SavedProjectID, job.OriginalProjectID,
|
||||||
job.ID, path, job.Quality,
|
job.ID, path, job.Quality,
|
||||||
|
|||||||
Reference in New Issue
Block a user