Skip to content

fix: increase bucket_name column length to 63 chars#58758

Open
boris324 wants to merge 1 commit intonextcloud:masterfrom
boris324:fix/bucket-name-length
Open

fix: increase bucket_name column length to 63 chars#58758
boris324 wants to merge 1 commit intonextcloud:masterfrom
boris324:fix/bucket-name-length

Conversation

@boris324
Copy link

@boris324 boris324 commented Mar 6, 2026

Summary

  • Increase bucket_name column length in oc_preview_locations from varchar(40) to varchar(63)
  • AWS allows bucket names up to 63 characters per bucket naming rules, but the column was too short to store them
  • Updates the initial table creation migration (for fresh installs) and adds a new migration to alter the column for existing installs

Changes

  1. core/Migrations/Version33000Date20250819110529.php - Updated initial schema to define bucket_name with length 63 instead of 40
  2. core/Migrations/Version33000Date20260306120000.php - New migration that increases the bucket_name column length to 63 for existing installations

Fixes #58755

Test plan

  • Fresh install: verify oc_preview_locations.bucket_name column is created as varchar(63)
  • Existing install with varchar(40): verify the new migration alters the column to varchar(63)
  • Verify previews still work correctly with bucket names up to 63 characters

🤖 Generated with Claude Code

@boris324 boris324 requested review from a team and skjnldsv as code owners March 6, 2026 17:50
@boris324 boris324 requested review from ArtificialOwl, come-nc, leftybournes, sorbaugh and szaimen and removed request for a team March 6, 2026 17:50
</NcFormBox>
<NcRadioGroup
v-model="store.userConfig.default_view"
name="default_view"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name="default_view"

I guess this is a mistake?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was from another branch that got mixed in by mistake. Removed it now, force pushed with only the bucket_name migration commit.

@szaimen szaimen removed their request for review March 9, 2026 11:18
AWS allows bucket names up to 63 characters per their naming rules,
but the bucket_name column in oc_preview_locations was varchar(40).

This updates the initial migration to use length 63 for fresh installs
and adds a new migration to alter the column for existing installs.

Fixes: nextcloud#58755

Signed-off-by: boris324 <boris324@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@boris324 boris324 force-pushed the fix/bucket-name-length branch from 8ea6b7e to 9c14810 Compare March 9, 2026 11:33
@boris324
Copy link
Author

boris324 commented Mar 9, 2026 via email

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.

[Bug]: bucket_name in oc_preview_locations too short

2 participants