DoliCloud/SellYourSaas

Database : some extrafields are 'ip' type and some others 'varchar' 128/255 ?

rycks opened this issue · 4 comments

rycks commented

Just a remark about some strange things into extrafields :

'ip_confirm_email',                   "IPConfirmEmail",       'ip'
.../...
'deployment_ipquality',          "DeploymentIPQuality",   'varchar' ../... '255'
.../...
'undeployment_ip',          "UndeploymentIP",   'varchar' .../... '128'

Note: dolibarr core cpde handle extrafields 'ip' as varchar 128

Note bis: https://databaseblog.myname.nl/2011/07/working-with-ips-in-mysql-and-mariadb.html

@rycks 'deployment_ipquality' is not an email

rycks commented

i don't speak about email but about ip addresses ... some of time there is varchar 128, sometime varchar 255 and 'ip' type is handle as varchar 128 in dolibarr core

last note / remark was about the most optimal way to store ip address (but be carefull about ipv4/ipv6 maybe)

@rycks yes sorry ... 'deployment_ipquality' is not an IP, this is a string

rycks commented

Hmmm, for "DeploymentIPQuality" here is the reason: it does not only store ip address but some text information (remoteip=xxxxx:yyyyyy) sorry for the noise