-- --------------------------------------------------------
+CREATE TABLE IF NOT EXISTS `config` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `cat` char(255) NOT NULL,
+ `k` char(255) NOT NULL,
+ `v` text NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+
+
+
--
-- Table structure for table `contact`
--
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL COMMENT 'owner uid',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `self` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'boolean 1 == info for local UID, primarily name and photo to use in item displays.',
+ `self` tinyint(1) NOT NULL DEFAULT '0',
+ `rel` tinyint(1) NOT NULL DEFAULT '0',
+ `duplex` tinyint(1) NOT NULL DEFAULT '0',
+ `network` char(255) NOT NULL,
`name` char(255) NOT NULL,
- `photo` text NOT NULL COMMENT 'remote photo URL initially until approved',
+ `nick` char(255) NOT NULL,
+ `photo` text NOT NULL,
`thumb` text NOT NULL,
+ `micro` text NOT NULL,
`site-pubkey` text NOT NULL,
`issued-id` char(255) NOT NULL,
`dfrn-id` char(255) NOT NULL,
`url` char(255) NOT NULL,
- `issued-pubkey` char(255) NOT NULL,
+ `lrdd` char(255) NOT NULL,
`pubkey` text NOT NULL,
`prvkey` text NOT NULL,
`request` text NOT NULL,
`confirm` text NOT NULL,
`aes_allow` tinyint(1) NOT NULL DEFAULT '0',
`ret-aes` tinyint(1) NOT NULL DEFAULT '0',
- `ret-id` char(255) NOT NULL,
- `ret-pubkey` text NOT NULL,
+ `usehub` tinyint(1) NOT NULL DEFAULT '0',
+ `subhub` tinyint(1) NOT NULL DEFAULT '0',
+ `hub-verify` char(255) NOT NULL,
`last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `term-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`priority` tinyint(3) NOT NULL,
`blocked` tinyint(1) NOT NULL DEFAULT '1',
`readonly` tinyint(1) NOT NULL DEFAULT '0',
`pending` tinyint(1) NOT NULL DEFAULT '1',
- `rating` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0-5 reputation, 0 unknown, 1 call police, 5 inscrutable',
- `reason` text NOT NULL COMMENT 'why a rating was given - will help friends decide to make friends or not',
- `profile-id` int(11) NOT NULL DEFAULT '0' COMMENT 'which profile to display - 0 is public default',
- PRIMARY KEY (`id`)
+ `rating` tinyint(1) NOT NULL DEFAULT '0',
+ `reason` text NOT NULL,
+ `profile-id` int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
+ KEY `uid` (`uid`),
+ KEY `self` (`self`),
+ KEY `issued-id` (`issued-id`),
+ KEY `dfrn-id` (`dfrn-id`),
+ KEY `blocked` (`blocked`),
+ KEY `readonly` (`readonly`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `group` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL,
+ `deleted` tinyint(1) NOT NULL DEFAULT '0',
`name` char(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
`uid` int(10) unsigned NOT NULL,
`contact-id` int(11) NOT NULL,
`knowyou` tinyint(1) NOT NULL,
+ `duplex` tinyint(1) NOT NULL DEFAULT '0',
`note` text NOT NULL,
`hash` char(255) NOT NULL,
`datetime` datetime NOT NULL,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`contact-id` int(10) unsigned NOT NULL DEFAULT '0',
`type` char(255) NOT NULL,
+ `wall` tinyint(1) NOT NULL DEFAULT '0',
+ `gravity` tinyint(1) NOT NULL DEFAULT '0',
`parent` int(10) unsigned NOT NULL DEFAULT '0',
`parent-uri` char(255) CHARACTER SET ascii NOT NULL,
`created` datetime NOT NULL,
`edited` datetime NOT NULL,
+ `changed` datetime NOT NULL,
`owner-name` char(255) NOT NULL,
`owner-link` char(255) NOT NULL,
`owner-avatar` char(255) NOT NULL,
`author-link` char(255) NOT NULL,
`author-avatar` char(255) NOT NULL,
`title` char(255) NOT NULL,
- `body` text NOT NULL,
+ `body` mediumtext NOT NULL,
+ `verb` char(255) NOT NULL,
+ `object-type` char(255) NOT NULL,
+ `object` text NOT NULL,
+ `target-type` char(255) NOT NULL,
+ `target` text NOT NULL,
`resource-id` char(255) NOT NULL,
+ `tag` mediumtext NOT NULL,
+ `inform` mediumtext NOT NULL,
+ `location` char(255) NOT NULL,
+ `coord` char(255) NOT NULL,
`allow_cid` mediumtext NOT NULL,
`allow_gid` mediumtext NOT NULL,
`deny_cid` mediumtext NOT NULL,
KEY `uid` (`uid`),
KEY `contact-id` (`contact-id`),
KEY `type` (`type`),
+ KEY `wall` (`wall`),
KEY `parent` (`parent`),
KEY `parent-uri` (`parent-uri`),
KEY `created` (`created`),
KEY `deleted` (`deleted`),
KEY `last-child` (`last-child`),
KEY `unseen` (`unseen`),
- KEY `unseen_2` (`unseen`),
FULLTEXT KEY `title` (`title`),
FULLTEXT KEY `body` (`body`),
FULLTEXT KEY `allow_cid` (`allow_cid`),
--
CREATE TABLE IF NOT EXISTS `mail` (
- `id` int(10) unsigned NOT NULL,
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL,
`from-name` char(255) NOT NULL,
`from-photo` char(255) NOT NULL,
CREATE TABLE IF NOT EXISTS `photo` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL,
+ `contact-id` int(10) unsigned NOT NULL,
`resource-id` char(255) NOT NULL,
`created` datetime NOT NULL,
`edited` datetime NOT NULL,
`data` mediumblob NOT NULL,
`scale` tinyint(3) NOT NULL,
`profile` tinyint(1) NOT NULL DEFAULT '0',
- `allow_uid` mediumtext NOT NULL,
+ `allow_cid` mediumtext NOT NULL,
`allow_gid` mediumtext NOT NULL,
- `deny_uid` mediumtext NOT NULL,
+ `deny_cid` mediumtext NOT NULL,
`deny_gid` mediumtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
`region` char(255) NOT NULL,
`postal-code` char(32) NOT NULL,
`country-name` char(255) NOT NULL,
- `gender` char(8) NOT NULL,
+ `gender` char(32) NOT NULL,
`marital` char(255) NOT NULL,
+ `with` text NOT NULL,
`sexual` char(255) NOT NULL,
`politic` char(255) NOT NULL,
`religion` char(255) NOT NULL,
`photo` char(255) NOT NULL,
`thumb` char(255) NOT NULL,
`publish` tinyint(1) NOT NULL DEFAULT '0',
+ `net-publish` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
`nickname` char(255) NOT NULL,
`email` char(255) NOT NULL,
`timezone` char(128) NOT NULL,
+ `default-location` char(255) NOT NULL,
+ `allow_location` tinyint(1) NOT NULL DEFAULT '0',
+ `theme` char(255) NOT NULL,
`pubkey` text NOT NULL,
`prvkey` text NOT NULL,
- `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
+ `spubkey` text NOT NULL,
+ `sprvkey` text NOT NULL,
+ `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
+ `page-flags` int(11) unsigned NOT NULL DEFAULT '0',
`pwdreset` char(255) NOT NULL,
- PRIMARY KEY (`uid`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+ `allow_cid` mediumtext NOT NULL,
+ `allow_gid` mediumtext NOT NULL,
+ `deny_cid` mediumtext NOT NULL,
+ `deny_gid` mediumtext NOT NULL,
+ PRIMARY KEY (`uid`),
+ KEY `nickname` (`nickname`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+
+CREATE TABLE IF NOT EXISTS `register` (
+ `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `hash` CHAR( 255 ) NOT NULL ,
+ `created` DATETIME NOT NULL ,
+ `uid` INT(11) UNSIGNED NOT NULL,
+ `password` CHAR(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE = MYISAM DEFAULT CHARSET=utf8;
\ No newline at end of file