]> git.mxchange.org Git - friendica.git/blobdiff - include/dbstructure.php
rework autocomplete: add NavBar forum search
[friendica.git] / include / dbstructure.php
index ee93fc9bd85f4183151ca49f057ce1988d96f5f9..ddf036f2c1cbe7edfedae0361d99e7523a9fecae 100644 (file)
@@ -62,7 +62,6 @@ function update_fail($update_id, $error_message){
        */
        //try the logger
        logger("CRITICAL: Database structure update failed: ".$retval);
-       break;
 }
 
 
@@ -454,6 +453,7 @@ function db_definition() {
                                        "keywords" => array("type" => "text", "not null" => "1"),
                                        "gender" => array("type" => "varchar(32)", "not null" => "1", "default" => ""),
                                        "attag" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
+                                       "avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "photo" => array("type" => "text", "not null" => "1"),
                                        "thumb" => array("type" => "text", "not null" => "1"),
                                        "micro" => array("type" => "text", "not null" => "1"),
@@ -667,9 +667,14 @@ function db_definition() {
                                        "about" => array("type" => "text", "not null" => "1"),
                                        "keywords" => array("type" => "text", "not null" => "1"),
                                        "gender" => array("type" => "varchar(32)", "not null" => "1", "default" => ""),
+                                       "birthday" => array("type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00"),
                                        "community" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
+                                       "hide" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
+                                       "nsfw" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "network" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "addr" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
+                                       "notify" => array("type" => "text", "not null" => "1"),
+                                       "alias" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "generation" => array("type" => "tinyint(3)", "not null" => "1", "default" => "0"),
                                        "server_url" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        ),
@@ -743,21 +748,6 @@ function db_definition() {
                                        "nurl" => array("nurl"),
                                        )
                        );
-       $database["guid"] = array(
-                       "fields" => array(
-                                       "id" => array("type" => "int(10) unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
-                                       "guid" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "plink" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "uri" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "network" => array("type" => "varchar(32)", "not null" => "1", "default" => ""),
-                                       ),
-                       "indexes" => array(
-                                       "PRIMARY" => array("id"),
-                                       "guid" => array("guid"),
-                                       "plink" => array("plink"),
-                                       "uri" => array("uri"),
-                                       )
-                       );
        $database["hook"] = array(
                        "fields" => array(
                                        "id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
@@ -796,6 +786,7 @@ function db_definition() {
                                        "uri" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "uid" => array("type" => "int(10) unsigned", "not null" => "1", "default" => "0"),
                                        "contact-id" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
+                                       "gcontact-id" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"),
                                        "type" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "wall" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "gravity" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
@@ -872,6 +863,7 @@ function db_definition() {
                                        "uid_thrparent" => array("uid","thr-parent"),
                                        "uid_parenturi" => array("uid","parent-uri"),
                                        "uid_contactid_created" => array("uid","contact-id","created"),
+                                       "gcontactid_uid_created" => array("gcontact-id","uid","created"),
                                        "wall_body" => array("wall","body(6)"),
                                        "uid_visible_moderated_created" => array("uid","visible","moderated","created"),
                                        "uid_uri" => array("uid","uri"),
@@ -1015,6 +1007,30 @@ function db_definition() {
                                        "receiver-uid" => array("receiver-uid"),
                                        )
                        );
+       $database["oembed"] = array(
+                       "fields" => array(
+                                       "url" => array("type" => "varchar(255)", "not null" => "1", "primary" => "1"),
+                                       "content" => array("type" => "text", "not null" => "1"),
+                                       "created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
+                                       ),
+                       "indexes" => array(
+                                       "PRIMARY" => array("url"),
+                                       "created" => array("created"),
+                                       )
+                       );
+       $database["parsed_url"] = array(
+                       "fields" => array(
+                                       "url" => array("type" => "varchar(255)", "not null" => "1", "primary" => "1"),
+                                       "guessing" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"),
+                                       "oembed" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"),
+                                       "content" => array("type" => "text", "not null" => "1"),
+                                       "created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
+                                       ),
+                       "indexes" => array(
+                                       "PRIMARY" => array("url", "guessing", "oembed"),
+                                       "created" => array("created"),
+                                       )
+                       );
        $database["pconfig"] = array(
                        "fields" => array(
                                        "id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
@@ -1288,6 +1304,7 @@ function db_definition() {
                                        "iid" => array("type" => "int(10) unsigned", "not null" => "1", "default" => "0", "primary" => "1"),
                                        "uid" => array("type" => "int(10) unsigned", "not null" => "1", "default" => "0"),
                                        "contact-id" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"),
+                                       "gcontact-id" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"),
                                        "created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
                                        "edited" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
                                        "commented" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
@@ -1317,6 +1334,8 @@ function db_definition() {
                                        "uid_network_created" => array("uid","network","created"),
                                        "uid_contactid_commented" => array("uid","contact-id","commented"),
                                        "uid_contactid_created" => array("uid","contact-id","created"),
+                                       "uid_gcontactid_commented" => array("uid","gcontact-id","commented"),
+                                       "uid_gcontactid_created" => array("uid","gcontact-id","created"),
                                        "wall_private_received" => array("wall","private","received"),
                                        "uid_created" => array("uid","created"),
                                        "uid_commented" => array("uid","commented"),
@@ -1335,21 +1354,6 @@ function db_definition() {
                                        "PRIMARY" => array("id"),
                                        )
                        );
-       $database["unique_contacts"] = array(
-                       "fields" => array(
-                                       "id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
-                                       "url" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "nick" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "name" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "location" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
-                                       "about" => array("type" => "text", "not null" => "1"),
-                                       ),
-                       "indexes" => array(
-                                       "PRIMARY" => array("id"),
-                                       "url" => array("url"),
-                                       )
-                       );
        $database["user"] = array(
                        "fields" => array(
                                        "uid" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),