Skip to content

fix: remove non-existent 'size' column from upload_requests INSERTs#1013

Merged
pyramation merged 2 commits intomainfrom
devin/1776595653-fix-upload-requests-size
Apr 19, 2026
Merged

fix: remove non-existent 'size' column from upload_requests INSERTs#1013
pyramation merged 2 commits intomainfrom
devin/1776595653-fix-upload-requests-size

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

The upload_requests table (generated by storage_module.sql in constructive-db) has no size column — size only exists on the files table. The plugin was including size in both upload_requests INSERT paths (normal upload and dedup), causing column "size" of relation "app_upload_requests" does not exist at runtime.

Plugin fix: Removes size from both INSERT statements and shifts the positional $N parameters accordingly.

Test fixture fix: Updates the simple-seed-storage upload_requests CREATE TABLE to match the actual generated schema — removes size, adds missing columns (actor_id, ip_address, user_agent).

Follow-up to PR #1012 which fixed mime_type/content_hash mismatches on the files table. Both bugs originated from the plugin SQL being written against assumed column names rather than the actual generated schema.

Review & Testing Checklist for Human

  • Verify positional parameter alignment in both INSERTs: Removing size shifted all $N params. Confirm the dedup path (5 columns → 5 values + 2 literals) and normal path (5 columns → 5 values + 1 literal + 1 param) are correctly aligned
  • Run the upload integration test (graphql/server-test) end-to-end to confirm requestUploadUrl → PUT → confirmUpload still works with the corrected column list
  • Check for any test-data.sql that INSERTs into upload_requests — the fixture schema changed column set, so any seed data INSERTs would need updating too

Notes

Link to Devin session: https://app.devin.ai/sessions/18879be982854a40abe5c9b915aa4a84
Requested by: @pyramation

The upload_requests table (generated by storage_module.sql) has no 'size'
column — size only exists on the files table. The plugin was trying to
INSERT size into upload_requests causing 'column size does not exist'.

Also updates the test fixture's upload_requests table to match the actual
generated schema: removes size, adds actor_id, ip_address, user_agent.
Missed the dedup path which had the same 'size' column issue in the
upload_requests INSERT.
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit 50a661b into main Apr 19, 2026
51 checks passed
@pyramation pyramation deleted the devin/1776595653-fix-upload-requests-size branch April 19, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant