[GH-ISSUE #1399] [FEATURE REQUEST] Change Avatar Data Type to MEDIUMBLOB? #487

Open
opened 2026-02-27 08:17:31 +03:00 by kerem · 1 comment
Owner

Originally created by @wuast94 on GitHub (Feb 19, 2026).
Original GitHub issue: https://github.com/lldap/lldap/issues/1399

Motivation
At the moment the data type for Avatar is BLOB which in mariadb only supports 64K size which is quite small for a Picture.

Describe the solution you'd like
If changing it to MEDIUMBLOB it would accept 16M which should be a sweetspot of not to large and not to small.

Describe alternatives you've considered
using tools to compress images so much is hard, and not really practical for non tech users.

Additional context
I found github.com/lldap/lldap@aa1384939b/crates/sql-backend-handler/src/sql_tables.rs (L198)
But i didn’t understand exactly how Postgres, SQLite, Mariadb and MySQL are implemented, as far as i know postgres dont have BLOB as data type at all, so i dont know how huge this change would be, at least for Mariadb (and maybee MySQL?) it should be a simple migration?

AND thanks for this great work

Originally created by @wuast94 on GitHub (Feb 19, 2026). Original GitHub issue: https://github.com/lldap/lldap/issues/1399 **Motivation** At the moment the data type for Avatar is BLOB which in mariadb only supports 64K size which is quite small for a Picture. **Describe the solution you'd like** If changing it to MEDIUMBLOB it would accept 16M which should be a sweetspot of not to large and not to small. **Describe alternatives you've considered** using tools to compress images so much is hard, and not really practical for non tech users. **Additional context** I found https://github.com/lldap/lldap/blob/aa1384939b6729cca0696d31ffcc4d69dee40696/crates/sql-backend-handler/src/sql_tables.rs#L198 But i didn’t understand exactly how Postgres, SQLite, Mariadb and MySQL are implemented, as far as i know postgres dont have BLOB as data type at all, so i dont know how huge this change would be, at least for Mariadb (and maybee MySQL?) it should be a simple migration? AND thanks for this great work
Author
Owner

@eyJhb commented on GitHub (Feb 19, 2026):

I'm not really sure how easy it is to change, based on this https://docs.rs/sea-query/0.32.7/src/sea_query/table/column.rs.html#18-59 .

But it was once migrated from binary to blob, ie. here

github.com/lldap/lldap@aa1384939b/crates/sql-backend-handler/src/sql_migrations.rs (L503-L510)

So... Maybe VarBinary would make sense?

<!-- gh-comment-id:3927581075 --> @eyJhb commented on GitHub (Feb 19, 2026): I'm not really sure how easy it is to change, based on this https://docs.rs/sea-query/0.32.7/src/sea_query/table/column.rs.html#18-59 . But it was once migrated from binary to blob, ie. here https://github.com/lldap/lldap/blob/aa1384939b6729cca0696d31ffcc4d69dee40696/crates/sql-backend-handler/src/sql_migrations.rs#L503-L510 So... Maybe VarBinary would make sense?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#487
No description provided.