aboutsummaryrefslogtreecommitdiffstats
path: root/database.sql
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-10-01 18:02:11 -0700
committerfriendica <info@friendica.com>2012-10-01 18:02:11 -0700
commit846a9813b23911ae2a87d87fb6fd9f188ed84dc0 (patch)
treea8a78b379cc8f4e25812c5b2cac603c86b6b1472 /database.sql
parentd261fe271fdee747244c76f7ba4679b8372a2e8c (diff)
downloadvolse-hubzilla-846a9813b23911ae2a87d87fb6fd9f188ed84dc0.tar.gz
volse-hubzilla-846a9813b23911ae2a87d87fb6fd9f188ed84dc0.tar.bz2
volse-hubzilla-846a9813b23911ae2a87d87fb6fd9f188ed84dc0.zip
here's where the heavy lifting begins - everything is likely to be broken for quite some time as we add location and db independence to items and conversations and work through the rest of the permissions and how to federate the buggers.
Diffstat (limited to 'database.sql')
-rw-r--r--database.sql43
1 files changed, 29 insertions, 14 deletions
diff --git a/database.sql b/database.sql
index fa3bc4027..35a7f8f7a 100644
--- a/database.sql
+++ b/database.sql
@@ -447,6 +447,7 @@ CREATE TABLE IF NOT EXISTS `hubloc` (
`hubloc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`hubloc_guid` char(255) NOT NULL DEFAULT '',
`hubloc_guid_sig` char(255) NOT NULL,
+ `hubloc_hash` char(255) NOT NULL,
`hubloc_flags` int(10) unsigned NOT NULL DEFAULT '0',
`hubloc_url` char(255) NOT NULL DEFAULT '',
`hubloc_url_sig` char(255) NOT NULL,
@@ -489,24 +490,19 @@ CREATE TABLE IF NOT EXISTS `item` (
`uri` char(255) CHARACTER SET ascii NOT NULL,
`aid` int(10) unsigned NOT NULL DEFAULT '0',
`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,
- `thr-parent` char(255) NOT NULL,
+ `thr_parent` char(255) NOT NULL,
`created` datetime NOT NULL,
`edited` datetime NOT NULL,
`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-name` char(255) NOT NULL,
- `owner-link` char(255) NOT NULL,
- `owner-avatar` char(255) NOT NULL,
- `author-name` char(255) NOT NULL,
- `author-link` char(255) NOT NULL,
- `author-avatar` char(255) NOT NULL,
+ `owner_xchan` char(255) NOT NULL DEFAULT '',
+ `author_xchan` char(255) NOT NULL,
`title` char(255) NOT NULL,
`body` mediumtext NOT NULL,
`app` char(255) NOT NULL,
@@ -518,7 +514,7 @@ CREATE TABLE IF NOT EXISTS `item` (
`target` text NOT NULL,
`postopts` text NOT NULL,
`plink` char(255) NOT NULL,
- `resource-id` char(255) NOT NULL,
+ `resource_id` char(255) NOT NULL,
`event-id` int(11) NOT NULL,
`attach` mediumtext NOT NULL,
`inform` mediumtext NOT NULL,
@@ -542,7 +538,6 @@ CREATE TABLE IF NOT EXISTS `item` (
PRIMARY KEY (`id`),
KEY `uri` (`uri`),
KEY `uid` (`uid`),
- KEY `contact-id` (`contact-id`),
KEY `type` (`type`),
KEY `parent` (`parent`),
KEY `created` (`created`),
@@ -555,16 +550,16 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `origin` (`origin`),
KEY `wall` (`wall`),
KEY `forum_mode` (`forum_mode`),
- KEY `author-link` (`author-link`),
KEY `bookmark` (`bookmark`),
KEY `moderated` (`moderated`),
KEY `spam` (`spam`),
- KEY `author-name` (`author-name`),
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`),
FULLTEXT KEY `title` (`title`),
FULLTEXT KEY `body` (`body`),
FULLTEXT KEY `allow_cid` (`allow_cid`),
@@ -688,7 +683,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
`uid` int(10) unsigned NOT NULL,
`contact-id` int(10) unsigned NOT NULL DEFAULT '0',
`guid` char(64) NOT NULL,
- `resource-id` char(255) NOT NULL,
+ `resource_id` char(255) NOT NULL,
`created` datetime NOT NULL,
`edited` datetime NOT NULL,
`title` char(255) NOT NULL,
@@ -707,7 +702,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
`deny_gid` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
- KEY `resource-id` (`resource-id`),
+ KEY `resource-id` (`resource_id`),
KEY `album` (`album`),
KEY `scale` (`scale`),
KEY `profile` (`profile`),
@@ -939,3 +934,23 @@ CREATE TABLE IF NOT EXISTS `userd` (
PRIMARY KEY (`id`),
KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `xchan` (
+ `xchan_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `xchan_guid` char(255) NOT NULL DEFAULT '',
+ `xchan_sig` char(255) NOT NULL DEFAULT '',
+ `xchan_hash` char(255) NOT NULL DEFAULT '',
+ `xchan_photo` char(255) NOT NULL DEFAULT '',
+ `xchan_addr` char(255) NOT NULL DEFAULT '',
+ `xchan_profile` char(255) NOT NULL DEFAULT '',
+ `xchan_name` char(255) NOT NULL DEFAULT '',
+ `xchan_network` char(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`xchan_id`),
+ KEY `xchan_guid` (`xchan_guid`),
+ KEY `xchan_sig` (`xchan_sig`),
+ KEY `xchan_hash` (`xchan_hash`),
+ KEY `xchan_addr` (`xchan_addr`),
+ KEY `xchan_profile` (`xchan_profile`),
+ KEY `xchan_name` (`xchan_name`),
+ KEY `xchan_network` (`xchan_network`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;