]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
introduced getBytesFromShorthand function to covert from shorthand notation to int
[friendica.git] / database.sql
index 9f96b7bbf3207fdf7823ac047b7672c087e0e173..8fa20be52c464b295f517d337ad9d7805a8459cc 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 2022.12-dev (Giant Rhubarb)
--- DB_UPDATE_VERSION 1488
+-- DB_UPDATE_VERSION 1491
 -- ------------------------------------------
 
 
@@ -80,7 +80,7 @@ CREATE TABLE IF NOT EXISTS `user` (
        `pwdreset` varchar(255) COMMENT 'Password reset request token',
        `pwdreset_time` datetime COMMENT 'Timestamp of the last password reset request',
        `maxreq` int unsigned NOT NULL DEFAULT 10 COMMENT '',
-       `expire` int unsigned NOT NULL DEFAULT 0 COMMENT '',
+       `expire` int unsigned NOT NULL DEFAULT 0 COMMENT 'Delay in days before deleting user-related posts. Scope is controlled by pConfig.',
        `account_removed` boolean NOT NULL DEFAULT '0' COMMENT 'if 1 the account is removed',
        `account_expired` boolean NOT NULL DEFAULT '0' COMMENT '',
        `account_expires_on` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'timestamp when account expires and will be deleted',
@@ -1646,6 +1646,35 @@ CREATE TABLE IF NOT EXISTS `register` (
        FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='registrations requiring admin approval';
 
+--
+-- TABLE report
+--
+CREATE TABLE IF NOT EXISTS `report` (
+       `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
+       `uid` mediumint unsigned COMMENT 'Reporting user',
+       `cid` int unsigned NOT NULL COMMENT 'Reported contact',
+       `comment` text COMMENT 'Report',
+       `forward` boolean COMMENT 'Forward the report to the remote server',
+       `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '',
+        PRIMARY KEY(`id`),
+        INDEX `uid` (`uid`),
+        INDEX `cid` (`cid`),
+       FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE,
+       FOREIGN KEY (`cid`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='';
+
+--
+-- TABLE report-post
+--
+CREATE TABLE IF NOT EXISTS `report-post` (
+       `rid` int unsigned NOT NULL COMMENT 'Report id',
+       `uri-id` int unsigned NOT NULL COMMENT 'Uri-id of the reported post',
+        PRIMARY KEY(`rid`,`uri-id`),
+        INDEX `uri-id` (`uri-id`),
+       FOREIGN KEY (`rid`) REFERENCES `report` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
+       FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='';
+
 --
 -- TABLE search
 --