make "key" in settings accept more than 32 varchar

by Mohamed Anouar Achoukhy ยท 9 years ago

as the title , the "key" settings is limited to varchar(32) .
is some case we need to store some setting that is unique and sometimes is long , like

paypal_universal_payments_custom_field_1 , the limitation make the
setting only for the first 32 char 'paypal_universal_payments_custom' .

best regards

https://www.blesta.com/forums/index.php?/topic/8402-key-in-settings-limited-to-32/

Comments (6)
tysonphillips Staff 9 years ago

Why not use an acronym? These keys are supposed to be short and concise. 64-char length keys aren't very short.

e.g., pup_cf1

Mohamed Anouar Achoukhy 9 years ago

64-char length keys aren't very long also !

i don't know why limit something that could be more flexible for dev to set thier own keys as they want .

blesta_license_data
myownlongmodulename_license_data

hope the idea was clear now .

tysonphillips Staff 9 years ago

32 character lengths are flexible. You have (36^32 = 6.3e+49) possible keys if you limit yourself to just alphanumeric characters.

A 64 character length means the field will double in size, but >50% of the size is wasted and unused. Since there are 4 levels of setting inheritance, this is multiplied 4-fold.

But also, maybe a 64 character limit would not be enough for some devs based on the keys they want to create, so why not have 128 characters, 192, or 256+?

Mohamed Anouar Achoukhy 9 years ago

i suggest 64, but if is 128 or more is so better !

tysonphillips Staff 9 years ago

How about 1 Gigabyte?

Michael Staff 9 years ago

nah nah Tyson we need Terabytes nowadays :D

1

1 voter

Status Under Review