 /*!40101 SET @saved_cs_client     = @@character_set_client */;
 /*!40101 SET character_set_client = utf8 */;
 CREATE TABLE `userd` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'sequential ID',
   `username` varchar(255) NOT NULL,
   PRIMARY KEY (`id`),
   KEY `username` (`username`(32))
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Deleted usernames';
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --

/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `conversation` (
  `item-uri` varbinary(255) NOT NULL,
  `reply-to-uri` varbinary(255) NOT NULL DEFAULT '',
  `conversation-uri` varbinary(255) NOT NULL DEFAULT '',
  `conversation-href` varbinary(255) NOT NULL DEFAULT '',
  `protocol` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `source` mediumtext,
  `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  PRIMARY KEY (`item-uri`),
  KEY `conversation-uri` (`conversation-uri`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--

  `nurl` varchar(255) NOT NULL DEFAULT '',
  `addr` varchar(255) NOT NULL DEFAULT '',
  `alias` varchar(255) NOT NULL DEFAULT '',
  `pubkey` text COMMENT 'RSA public key 4096 bit',
  `prvkey` text COMMENT 'RSA private key 4096 bit',
  `batch` varchar(255) NOT NULL DEFAULT '',
  `request` varchar(255) DEFAULT NULL,
  `notify` varchar(255) DEFAULT NULL,
  `poll` varchar(255) DEFAULT NULL,
  `confirm` varchar(255) DEFAULT NULL,
  `poco` varchar(255) DEFAULT NULL,
  `aes_allow` tinyint(1) NOT NULL DEFAULT '0',
  `ret-aes` tinyint(1) NOT NULL DEFAULT '0',
  `usehub` tinyint(1) NOT NULL DEFAULT '0',
  `subhub` tinyint(1) NOT NULL DEFAULT '0',
  `hub-verify` varchar(255) NOT NULL DEFAULT '',
  `last-update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last try to update the contact info',
  `success_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last successful contact update',
  `failure_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last failed update',
  `name-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `uri-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `avatar-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `term-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `last-item` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'date of the last post',
  `priority` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `blocked` tinyint(1) NOT NULL DEFAULT '1',
  `readonly` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'posts of the contact are readonly',
  `writable` tinyint(1) NOT NULL DEFAULT '0',
  `forum` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'contact is a forum',
  `prv` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'contact is a private group',
  `contact-type` tinyint(4) NOT NULL DEFAULT '0',
  `hidden` tinyint(1) NOT NULL DEFAULT '0',
  `archive` tinyint(1) NOT NULL DEFAULT '0',
  `pending` tinyint(1) NOT NULL DEFAULT '1',
  `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Contact has been deleted',
  `rating` tinyint(4) NOT NULL DEFAULT '0',
  `reason` text,
  `closeness` tinyint(3) unsigned NOT NULL DEFAULT '99',
  `info` mediumtext,
  `profile-id` int(10) unsigned NOT NULL DEFAULT '0',
  `bdyear` varchar(4) NOT NULL DEFAULT '',
  `bd` date NOT NULL DEFAULT '0001-01-01',
  `notify_new_posts` tinyint(1) NOT NULL DEFAULT '0',
  `fetch_further_information` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `ffi_keyword_blacklist` text,
  PRIMARY KEY (`id`),
  KEY `uid_name` (`uid`,`name`(190)),
