From b4eef25d37bbd75935e5f86674a66e6cdcdca3fc Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Fri, 1 Mar 2019 09:23:55 +0100 Subject: [PATCH 1/2] Adding updated field to photo table --- config/dbstructure.config.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/dbstructure.config.php b/config/dbstructure.config.php index 050543675..f03132add 100644 --- a/config/dbstructure.config.php +++ b/config/dbstructure.config.php @@ -34,7 +34,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1303); + define('DB_UPDATE_VERSION', 1304); } return [ @@ -960,7 +960,8 @@ return [ "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"], "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"], "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"], - "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"] + "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"], + "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""] ], "indexes" => [ "PRIMARY" => ["id"], From c9a7b8334a4856c7b3030f0442b5369bc4dcea79 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Fri, 1 Mar 2019 09:27:56 +0100 Subject: [PATCH 2/2] Adding to database.sql too --- database.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/database.sql b/database.sql index 2102a9398..10a428fff 100644 --- a/database.sql +++ b/database.sql @@ -879,6 +879,7 @@ CREATE TABLE IF NOT EXISTS `photo` ( `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups', `backend-class` tinytext COMMENT 'Storage backend class', `backend-ref` text COMMENT 'Storage backend data reference', + `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'edited timestamp', PRIMARY KEY(`id`), INDEX `contactid` (`contact-id`), INDEX `uid_contactid` (`uid`,`contact-id`),