]> git.mxchange.org Git - friendica.git/commitdiff
"participation" is removed since it is unused
authorMichael <heluecht@pirati.ca>
Tue, 2 Feb 2021 06:28:51 +0000 (06:28 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 2 Feb 2021 06:28:51 +0000 (06:28 +0000)
database.sql
doc/database.md
doc/database/db_particiation.md [deleted file]
src/Database/DBStructure.php
static/dbstructure.config.php
update.php

index b717da44602896473108f0a9fd2cb331d3406b23..60dca5f5f1b2faaf758211df919babb9bca62aea 100644 (file)
@@ -970,22 +970,6 @@ CREATE TABLE IF NOT EXISTS `parsed_url` (
         INDEX `created` (`created`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='cache for \'parse_url\' queries';
 
---
--- TABLE participation
---
-CREATE TABLE IF NOT EXISTS `participation` (
-       `iid` int unsigned NOT NULL COMMENT '',
-       `server` varchar(60) NOT NULL COMMENT '',
-       `cid` int unsigned NOT NULL COMMENT '',
-       `fid` int unsigned NOT NULL COMMENT '',
-        PRIMARY KEY(`iid`,`server`),
-        INDEX `cid` (`cid`),
-        INDEX `fid` (`fid`),
-       FOREIGN KEY (`iid`) REFERENCES `item` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
-       FOREIGN KEY (`cid`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
-       FOREIGN KEY (`fid`) REFERENCES `fcontact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
-) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Storage for participation messages from Diaspora';
-
 --
 -- TABLE pconfig
 --
index e135b19ae73064f2126adbf6e0ad9459f5254647..447607f8da4372df1769970892338b275ae152a2 100644 (file)
@@ -32,7 +32,6 @@ Database Tables
 | [notify-threads](help/database/db_notify-threads)    |                                                  |
 | [oembed](help/database/db_oembed)                    | cache for OEmbed queries                         |
 | [parsed_url](help/database/db_parsed_url)            | cache for "parse_url" queries                    |
-| [participation](help/database/db_participation)      | Storage for participation messages from Diaspora |
 | [pconfig](help/database/db_pconfig)                  | personal (per user) configuration storage        |
 | [photo](help/database/db_photo)                      | photo storage                                    |
 | [poll](help/database/db_poll)                        | data for polls                                   |
diff --git a/doc/database/db_particiation.md b/doc/database/db_particiation.md
deleted file mode 100644 (file)
index 27f0632..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Table participation
-===================
-
-| Field       | Description      | Type             | Null | Key | Default             | Extra |
-|-------------|------------------|------------------|------|-----|---------------------|-------|
-| iid         | item id          | int(10) unsigned | NO   | PRI |                     |       |
-| server      | Name of server   | varchar(60)      | NO   | PRI |                     |       |
-| cid         | contact id       | int(10) unsigned | NO   |     |                     |       |
-
-Return to [database documentation](help/database)
index 3e1ef7aa1bc66fb87d6513e50743f131d18ba66d..b9e53be045cacf6031303005259f206bd8528b8f 100644 (file)
@@ -79,7 +79,7 @@ class DBStructure
                }
 
                $old_tables = ['fserver', 'gcign', 'gcontact', 'gcontact-relation', 'gfollower' ,'glink', 'item-delivery-data',
-                       'item-activity', 'item-content', 'item_id', 'poll', 'poll_result', 'queue', 'retriever_rule',
+                       'item-activity', 'item-content', 'item_id', 'participation', 'poll', 'poll_result', 'queue', 'retriever_rule',
                        'sign', 'spam', 'term', 'user-item'];
 
                $tables = DBA::selectToArray(['INFORMATION_SCHEMA' => 'TABLES'], ['TABLE_NAME'],
index d6e21512a629e93b8a2651225a3460b6e1e791ff..6b8aba3acd9257730c52583f68ca371c2a7162f3 100644 (file)
@@ -1031,20 +1031,6 @@ return [
                        "created" => ["created"],
                ]
        ],
-       "participation" => [
-               "comment" => "Storage for participation messages from Diaspora",
-               "fields" => [
-                       "iid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item" => "id"], "comment" => ""],
-                       "server" => ["type" => "varchar(60)", "not null" => "1", "primary" => "1", "comment" => ""],
-                       "cid" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["contact" => "id"], "comment" => ""],
-                       "fid" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["fcontact" => "id"], "comment" => ""],
-               ],
-               "indexes" => [
-                       "PRIMARY" => ["iid", "server"],
-                       "cid" => ["cid"],
-                       "fid" => ["fid"]
-               ]
-       ],
        "pconfig" => [
                "comment" => "personal (per user) configuration storage",
                "fields" => [
index d5bfc5fe39c0a523dabf9510bcb6c531901fd93e..94029065b2f03a6dc534234cb3b317878c3525dc 100644 (file)
@@ -490,10 +490,6 @@ function pre_update_1364()
                return Update::FAILED;
        }
 
-       if (!DBA::e("DELETE FROM `participation` WHERE NOT `cid` IN (SELECT `id` FROM `contact`)")) {
-               return Update::FAILED;
-       }
-
        if (!DBA::e("DELETE FROM `profile_check` WHERE NOT `cid` IN (SELECT `id` FROM `contact`)")) {
                return Update::FAILED;
        }
@@ -502,10 +498,6 @@ function pre_update_1364()
                return Update::FAILED;
        }
 
-       if (!DBA::e("DELETE FROM `participation` WHERE NOT `fid` IN (SELECT `id` FROM `fcontact`)")) {
-               return Update::FAILED;
-       }
-
        if (!DBA::e("DELETE FROM `group_member` WHERE NOT `gid` IN (SELECT `id` FROM `group`)")) {
                return Update::FAILED;
        }
@@ -514,10 +506,6 @@ function pre_update_1364()
                return Update::FAILED;
        }
 
-       if (!DBA::e("DELETE FROM `participation` WHERE NOT `iid` IN (SELECT `id` FROM `item`)")) {
-               return Update::FAILED;
-       }
-
        if (DBStructure::existsTable('user-item') && !DBA::e("DELETE FROM `user-item` WHERE NOT `iid` IN (SELECT `id` FROM `item`)")) {
                return Update::FAILED;
        }