Skip to content

fix: change avatar column type to TEXT to support long URLs#1499

Open
maishivamhoo123 wants to merge 2 commits intoapache:mainfrom
maishivamhoo123:fix/avatar-column-length
Open

fix: change avatar column type to TEXT to support long URLs#1499
maishivamhoo123 wants to merge 2 commits intoapache:mainfrom
maishivamhoo123:fix/avatar-column-length

Conversation

@maishivamhoo123
Copy link
Contributor

Type of change

Description

This PR changes the avatar column type from VARCHAR to TEXT in the user table.

Reason:
Some Google profile image URLs exceed the previous character limit (1024/2048 chars), causing 500 errors during login or registration. Switching to TEXT ensures support for long URLs (up to 65kb).

Changes

  1. Entity: Updated User struct in internal/entity/user_entity.go to use TEXT for the avatar field.
  2. Migration: Added v1.8.2 migration (internal/migrations/v32.go) to alter the database column automatically.

Verification

  • Tested locally with MySQL.
  • Verified that inserting a string longer than 2048 characters into the avatar column now succeeds without error.

@maishivamhoo123
Copy link
Contributor Author

maishivamhoo123 commented Feb 6, 2026

@LinkinStars @team can you please review this pr.
Thank you!

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