diff options
author | friendica <info@friendica.com> | 2013-02-10 19:00:22 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-02-10 19:00:22 -0800 |
commit | 869b704b4019b49fdb5fb174fabd13b4e0e9aec0 (patch) | |
tree | 0d81f107bbbc15d0eea778efb722701b8dde1f55 | |
parent | 27c9288addb1630551633bdc4e631d4d01b5b93e (diff) | |
download | volse-hubzilla-869b704b4019b49fdb5fb174fabd13b4e0e9aec0.tar.gz volse-hubzilla-869b704b4019b49fdb5fb174fabd13b4e0e9aec0.tar.bz2 volse-hubzilla-869b704b4019b49fdb5fb174fabd13b4e0e9aec0.zip |
add mimetype to items
-rw-r--r-- | boot.php | 2 | ||||
-rw-r--r-- | install/database.sql | 4 | ||||
-rw-r--r-- | install/update.php | 12 |
3 files changed, 15 insertions, 3 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', 1026 ); +define ( 'DB_UPDATE_VERSION', 1027 ); 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 6f70438f3..de1d096b2 100644 --- a/install/database.sql +++ b/install/database.sql @@ -453,6 +453,7 @@ CREATE TABLE IF NOT EXISTS `item` ( `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `owner_xchan` char(255) NOT NULL DEFAULT '', `author_xchan` char(255) NOT NULL DEFAULT '', + `mimetype` char(255) NOT NULL DEFAULT '', `title` char(255) NOT NULL DEFAULT '', `body` mediumtext NOT NULL, `app` char(255) NOT NULL DEFAULT '', @@ -503,6 +504,7 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `llink` (`llink`), KEY `expires` (`expires`), KEY `revision` (`revision`), + KEY `mimetype` (`mimetype`), FULLTEXT KEY `title` (`title`), FULLTEXT KEY `body` (`body`), FULLTEXT KEY `allow_cid` (`allow_cid`), @@ -774,7 +776,7 @@ CREATE TABLE IF NOT EXISTS `register` ( KEY `hash` (`hash`), KEY `created` (`created`), KEY `uid` (`uid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `session` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, diff --git a/install/update.php b/install/update.php index 4973b92ff..d4d1bdf50 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1026 ); +define( 'UPDATE_VERSION' , 1027 ); /** * @@ -332,3 +332,13 @@ ADD `flags` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `folder` , add index ( folde return UPDATE_SUCCESS; return UPDATE_FAILED; } + +function update_r1026() { + $r = q("ALTER TABLE `item` ADD `mimetype` CHAR( 255 ) NOT NULL DEFAULT '' AFTER `author_xchan` , +ADD INDEX ( `mimetype` )"); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + + |