]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
photo album finish, general cleanup begins
[friendica.git] / database.sql
index 55dcaeb13178ffe88f283212f25faba8f7474627..1411ec6da9bd1240f73099cdb20189e508cd47b8 100644 (file)
@@ -40,9 +40,9 @@ CREATE TABLE IF NOT EXISTS `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',
   `name` char(255) NOT NULL,
-  `photo` text NOT NULL COMMENT 'remote photo URL initially until approved',
+  `photo` text NOT NULL
   `thumb` text NOT NULL,
   `site-pubkey` text NOT NULL,
   `issued-id` char(255) NOT NULL,
@@ -64,9 +64,9 @@ CREATE TABLE IF NOT EXISTS `contact` (
   `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',
+  `rating` tinyint(1) NOT NULL DEFAULT '0',
+  `reason` text NOT NULL,
+  `profile-id` int(11) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
@@ -141,6 +141,9 @@ CREATE TABLE IF NOT EXISTS `item` (
   `title` char(255) NOT NULL,
   `body` text NOT NULL,
   `resource-id` char(255) NOT NULL,
+  `like` mediumtext NOT NULL,
+  `dislike` mediumtext NOT NULL,
+  `tag` mediumtext NOT NULL,
   `allow_cid` mediumtext NOT NULL,
   `allow_gid` mediumtext NOT NULL,
   `deny_cid` mediumtext NOT NULL,
@@ -162,7 +165,6 @@ CREATE TABLE IF NOT EXISTS `item` (
   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`),
@@ -178,7 +180,7 @@ CREATE TABLE IF NOT EXISTS `item` (
 --
 
 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,
@@ -204,6 +206,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
 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,
@@ -216,9 +219,9 @@ CREATE TABLE IF NOT EXISTS `photo` (
   `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;
@@ -314,5 +317,19 @@ CREATE TABLE IF NOT EXISTS `user` (
   `blocked` tinyint(1) unsigned NOT NULL DEFAULT '0',
   `notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
   `pwdreset` char(255) NOT NULL,
+  `allow_cid` mediumtext NOT NULL,
+  `allow_gid` mediumtext NOT NULL,
+  `deny_cid` mediumtext NOT NULL,
+  `deny_gid` mediumtext NOT NULL,
   PRIMARY KEY (`uid`)
 ) 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