]> git.mxchange.org Git - friendica.git/commitdiff
Code standards and updated database documentation
authorMichael <heluecht@pirati.ca>
Mon, 1 Aug 2022 07:06:30 +0000 (07:06 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 1 Aug 2022 07:06:30 +0000 (07:06 +0000)
database.sql
doc/database.md
doc/database/db_fetch-entry.md [new file with mode: 0644]
src/Protocol/ActivityPub/Fetch.php

index a2f09e1c3801da9de2779e86ed6f0eacde25b989..7663b71590c22ff0c568b1b02af0b48385a9833f 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 2022.09-dev (Giant Rhubarb)
--- DB_UPDATE_VERSION 1476
+-- DB_UPDATE_VERSION 1477
 -- ------------------------------------------
 
 
@@ -632,6 +632,21 @@ CREATE TABLE IF NOT EXISTS `fcontact` (
        FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Diaspora compatible contacts - used in the Diaspora implementation';
 
+--
+-- TABLE fetch-entry
+--
+CREATE TABLE IF NOT EXISTS `fetch-entry` (
+       `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
+       `url` varbinary(255) COMMENT 'url that awaiting to be fetched',
+       `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Creation date of the fetch request',
+       `wid` int unsigned COMMENT 'Workerqueue id',
+        PRIMARY KEY(`id`),
+        UNIQUE INDEX `url` (`url`),
+        INDEX `created` (`created`),
+        INDEX `wid` (`wid`),
+       FOREIGN KEY (`wid`) REFERENCES `workerqueue` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='';
+
 --
 -- TABLE fsuggest
 --
index 9932ee307a9be499e81958b3cc7951e2492647e3..2bd2fa5f4921d2e9bb0fc35c5377f7dd8f8e1be2 100644 (file)
@@ -24,6 +24,7 @@ Database Tables
 | [endpoint](help/database/db_endpoint) | ActivityPub endpoints - used in the ActivityPub implementation |
 | [event](help/database/db_event) | Events |
 | [fcontact](help/database/db_fcontact) | Diaspora compatible contacts - used in the Diaspora implementation |
+| [fetch-entry](help/database/db_fetch-entry) |  |
 | [fsuggest](help/database/db_fsuggest) | friend suggestion stuff |
 | [group](help/database/db_group) | privacy groups, group info |
 | [group_member](help/database/db_group_member) | privacy groups, member info |
diff --git a/doc/database/db_fetch-entry.md b/doc/database/db_fetch-entry.md
new file mode 100644 (file)
index 0000000..4b3cba1
--- /dev/null
@@ -0,0 +1,33 @@
+Table fetch-entry
+===========
+
+
+
+Fields
+------
+
+| Field   | Description                        | Type           | Null | Key | Default             | Extra          |
+| ------- | ---------------------------------- | -------------- | ---- | --- | ------------------- | -------------- |
+| id      | sequential ID                      | int unsigned   | NO   | PRI | NULL                | auto_increment |
+| url     | url that awaiting to be fetched    | varbinary(255) | YES  |     | NULL                |                |
+| created | Creation date of the fetch request | datetime       | NO   |     | 0001-01-01 00:00:00 |                |
+| wid     | Workerqueue id                     | int unsigned   | YES  |     | NULL                |                |
+
+Indexes
+------------
+
+| Name    | Fields      |
+| ------- | ----------- |
+| PRIMARY | id          |
+| url     | UNIQUE, url |
+| created | created     |
+| wid     | wid         |
+
+Foreign Keys
+------------
+
+| Field | Target Table | Target Field |
+|-------|--------------|--------------|
+| wid | [workerqueue](help/database/db_workerqueue) | id |
+
+Return to [database documentation](help/database)
index 198202b1c1528310168062dabe946fc649638e5c..54666e691ed430321588c90ca759145a30be2d62 100644 (file)
@@ -80,5 +80,4 @@ class Fetch
 
                return DBA::exists('workerqueue', ['id' => $fetch['wid'], 'done' => false]);
        }
-
 }