diff options
-rw-r--r-- | boot.php | 2 | ||||
-rw-r--r-- | install/database.sql | 2 | ||||
-rw-r--r-- | install/update.php | 11 |
3 files changed, 13 insertions, 2 deletions
@@ -16,7 +16,7 @@ require_once('include/features.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica Red'); define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1011 ); +define ( 'DB_UPDATE_VERSION', 1012 ); define ( 'EOL', '<br />' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/install/database.sql b/install/database.sql index 02bbb5f0f..cab10005e 100644 --- a/install/database.sql +++ b/install/database.sql @@ -432,6 +432,7 @@ CREATE TABLE IF NOT EXISTS `item` ( `thr_parent` char(255) NOT NULL DEFAULT '', `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', @@ -484,6 +485,7 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `verb` (`verb`), KEY `item_private` (`item_private`), KEY `llink` (`llink`), + KEY `expires` (`expires`), FULLTEXT KEY `title` (`title`), FULLTEXT KEY `body` (`body`), FULLTEXT KEY `allow_cid` (`allow_cid`), diff --git a/install/update.php b/install/update.php index e8f52273e..3b75f0e5f 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1011 ); +define( 'UPDATE_VERSION' , 1012 ); /** * @@ -180,3 +180,12 @@ ADD INDEX ( `abook_dob` )"); return UPDATE_FAILED; } +function update_r1011() { + $r = q("ALTER TABLE `item` ADD `expires` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `edited` , +ADD INDEX ( `expires` )"); + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + |