[ZendTo] SQL schema inconsistencies - email recipients

Orion Poplawski orion at nwra.com
Tue May 2 16:38:45 BST 2023


There seems to be a couple inconsistencies in the sql schema:

CREATE TABLE IF NOT EXISTS `addressbook` (
  `username` varchar(255) NOT NULL,
  `name` varchar(255),
  `email` varchar(255) NOT NULL,

CREATE TABLE IF NOT EXISTS `recipient` (
  `recipName` varchar(32) NOT NULL,
  `recipEmail` text NOT NULL,


CREATE TABLE IF NOT EXISTS `usertable` (
  `username`     varchar(64) NOT NULL,
  `mail`         varchar(256) NOT NULL,
  `displayname`  varchar(256) NOT NULL,


CREATE TABLE IF NOT EXISTS `pickup` (
  `authorizedUser` varchar(255) NOT NULL,
  `emailAddr` tinytext,

CREATE TABLE IF NOT EXISTS `dropoff` (
  `authorizedUser` varchar(255) DEFAULT NULL,
  `senderName` varchar(32) NOT NULL,
  `senderEmail` varchar(255) NOT NULL,

CREATE TABLE IF NOT EXISTS `authtable` (
  `Auth` varchar(64) NOT NULL,
  `FullName` varchar(256) DEFAULT NULL,
  `Email` text NOT NULL,



name/recipName/displayname/senderName/FullName is variously
varchar(255)/varchar(32)/varchar(256)

And we just ran into an issue with a user hitting the 32 char limit in recipName.

email/recipEmail/emailAddr/senderEmail/Email is variously
varchar(255)/text/varchar(256)/tinytext

username is variously varchar(255)/varchar(64).  And possibly the fields
authorizedUser and Auth are related?

It would probably be good to use consistent field types in the various tables.

-- 
Orion Poplawski
IT Systems Manager                         720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion at nwra.com
Boulder, CO 80301                 https://www.nwra.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3847 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://jul.es/pipermail/zendto/attachments/20230502/e9ea3c8f/attachment.p7s>


More information about the ZendTo mailing list