aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--database.sql148
1 files changed, 27 insertions, 121 deletions
diff --git a/database.sql b/database.sql
index 0488a9243..8cb634eaa 100644
--- a/database.sql
+++ b/database.sql
@@ -257,20 +257,6 @@ CREATE TABLE IF NOT EXISTS `contact` (
KEY `aid` (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-CREATE TABLE IF NOT EXISTS `conv` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `guid` char(64) NOT NULL,
- `recips` mediumtext NOT NULL,
- `uid` int(11) NOT NULL,
- `creator` char(255) NOT NULL,
- `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `subject` mediumtext NOT NULL,
- PRIMARY KEY (`id`),
- KEY `created` (`created`),
- KEY `updated` (`updated`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
CREATE TABLE IF NOT EXISTS `deliverq` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`cmd` char(32) NOT NULL,
@@ -491,79 +477,65 @@ CREATE TABLE IF NOT EXISTS `intro` (
CREATE TABLE IF NOT EXISTS `item` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `uri` char(255) CHARACTER SET ascii NOT NULL,
+ `uri` char(255) CHARACTER SET ascii NOT NULL DEFAULT '',
`aid` int(10) unsigned NOT NULL DEFAULT '0',
`uid` 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,
- `thr_parent` char(255) NOT NULL,
- `created` datetime NOT NULL,
- `edited` datetime NOT NULL,
+ `parent_uri` char(255) CHARACTER SET ascii NOT NULL DEFAULT '',
+ `thr_parent` char(255) NOT NULL DEFAULT '',
+ `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`owner_xchan` char(255) NOT NULL DEFAULT '',
- `author_xchan` char(255) NOT NULL,
- `title` char(255) NOT NULL,
+ `author_xchan` char(255) NOT NULL DEFAULT '',
+ `title` char(255) NOT NULL DEFAULT '',
`body` mediumtext NOT NULL,
- `app` char(255) NOT NULL,
- `lang` char(64) NOT NULL,
- `verb` char(255) NOT NULL,
- `obj_type` char(255) NOT NULL,
+ `app` char(255) NOT NULL DEFAULT '',
+ `lang` char(64) NOT NULL DEFAULT '',
+ `verb` char(255) NOT NULL DEFAULT '',
+ `obj_type` char(255) NOT NULL DEFAULT '',
`object` text NOT NULL,
- `tgt_type` char(255) NOT NULL,
+ `tgt_type` char(255) NOT NULL DEFAULT '',
`target` text NOT NULL,
`postopts` text NOT NULL,
- `plink` char(255) NOT NULL,
- `resource_id` char(255) NOT NULL,
- `event-id` int(11) NOT NULL,
+ `plink` char(255) NOT NULL DEFAULT '',
+ `resource_id` char(255) NOT NULL DEFAULT '',
+ `resource_type` char(16) NOT NULL DEFAULT '',
`attach` mediumtext NOT NULL,
`inform` mediumtext NOT NULL,
- `location` char(255) NOT NULL,
- `coord` char(255) NOT NULL,
+ `location` char(255) NOT NULL DEFAULT '',
+ `coord` char(255) NOT NULL DEFAULT '',
`allow_cid` mediumtext NOT NULL,
`allow_gid` mediumtext NOT NULL,
`deny_cid` mediumtext NOT NULL,
`deny_gid` mediumtext NOT NULL,
- `private` tinyint(1) NOT NULL DEFAULT '0',
- `pubmail` tinyint(1) NOT NULL DEFAULT '0',
- `moderated` tinyint(1) NOT NULL DEFAULT '0',
- `visible` tinyint(1) NOT NULL DEFAULT '0',
- `spam` tinyint(1) NOT NULL DEFAULT '0',
- `starred` tinyint(1) NOT NULL DEFAULT '0',
- `bookmark` tinyint(1) NOT NULL DEFAULT '0',
- `unseen` tinyint(1) NOT NULL DEFAULT '1',
- `deleted` tinyint(1) NOT NULL DEFAULT '0',
- `origin` tinyint(1) NOT NULL DEFAULT '0',
- `forum_mode` tinyint(1) NOT NULL DEFAULT '0',
+ `item_restrict` int(11) NOT NULL DEFAULT '0',
+ `item_flags` int(11) NOT NULL DEFAULT '0',
+ `item_private` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uri` (`uri`),
KEY `uid` (`uid`),
- KEY `type` (`type`),
KEY `parent` (`parent`),
KEY `created` (`created`),
KEY `edited` (`edited`),
- KEY `visible` (`visible`),
- KEY `deleted` (`deleted`),
- KEY `unseen` (`unseen`),
KEY `received` (`received`),
- KEY `starred` (`starred`),
- KEY `origin` (`origin`),
KEY `wall` (`wall`),
- KEY `forum_mode` (`forum_mode`),
- KEY `bookmark` (`bookmark`),
- KEY `moderated` (`moderated`),
- KEY `spam` (`spam`),
KEY `uid_commented` (`uid`,`commented`),
KEY `uid_created` (`uid`,`created`),
- KEY `uid_unseen` (`uid`,`unseen`),
KEY `parent_uri` (`parent_uri`),
KEY `aid` (`aid`),
KEY `owner_xchan` (`owner_xchan`),
KEY `author_xchan` (`author_xchan`),
+ KEY `resource_type` (`resource_type`),
+ KEY `item_restrict` (`item_restrict`),
+ KEY `item_flags` (`item_flags`),
+ KEY `uid_uri` (`uri`,`uid`),
+ KEY `commented` (`commented`),
+ KEY `verb` (`verb`),
+ KEY `item_private` (`item_private`),
FULLTEXT KEY `title` (`title`),
FULLTEXT KEY `body` (`body`),
FULLTEXT KEY `allow_cid` (`allow_cid`),
@@ -873,72 +845,6 @@ CREATE TABLE IF NOT EXISTS `tokens` (
KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-CREATE TABLE IF NOT EXISTS `user` (
- `uid` int(11) NOT NULL AUTO_INCREMENT,
- `account_id` int(10) unsigned NOT NULL,
- `guid` char(16) NOT NULL,
- `username` char(255) NOT NULL,
- `password` char(255) NOT NULL,
- `nickname` char(255) NOT NULL,
- `webid` char(255) NOT NULL,
- `email` char(255) NOT NULL,
- `openid` char(255) NOT NULL,
- `timezone` char(128) NOT NULL,
- `language` char(16) NOT NULL DEFAULT 'en',
- `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `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',
- `blockwall` tinyint(1) NOT NULL DEFAULT '0',
- `hidewall` tinyint(1) NOT NULL DEFAULT '0',
- `blocktags` tinyint(1) NOT NULL DEFAULT '0',
- `unkmail` tinyint(1) NOT NULL DEFAULT '0',
- `cntunkmail` int(11) NOT NULL DEFAULT '10',
- `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
- `page-flags` int(11) NOT NULL DEFAULT '0',
- `pwdreset` char(255) NOT NULL,
- `maxreq` int(11) NOT NULL DEFAULT '10',
- `expire` int(10) unsigned NOT NULL DEFAULT '0',
- `account_removed` tinyint(1) NOT NULL DEFAULT '0',
- `account_expired` tinyint(1) NOT NULL DEFAULT '0',
- `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `service_class` char(32) NOT NULL,
- `def_gid` int(11) NOT NULL DEFAULT '0',
- `allow_cid` mediumtext NOT NULL,
- `allow_gid` mediumtext NOT NULL,
- `deny_cid` mediumtext NOT NULL,
- `deny_gid` mediumtext NOT NULL,
- `openidserver` text NOT NULL,
- PRIMARY KEY (`uid`),
- KEY `nickname` (`nickname`),
- KEY `login_date` (`login_date`),
- KEY `account_expired` (`account_expired`),
- KEY `hidewall` (`hidewall`),
- KEY `blockwall` (`blockwall`),
- KEY `blocked` (`blocked`),
- KEY `verified` (`verified`),
- KEY `unkmail` (`unkmail`),
- KEY `cntunkmail` (`cntunkmail`),
- KEY `account_removed` (`account_removed`),
- KEY `service_class` (`service_class`),
- KEY `webid` (`webid`),
- KEY `email` (`email`),
- KEY `account_id` (`account_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-CREATE TABLE IF NOT EXISTS `userd` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `username` char(255) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `username` (`username`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
CREATE TABLE IF NOT EXISTS `xchan` (
`xchan_hash` char(255) NOT NULL,
`xchan_guid` char(255) NOT NULL DEFAULT '',