aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-30 17:27:32 -0800
committerfriendica <info@friendica.com>2013-01-30 17:27:32 -0800
commit3767bba3c3669b6e882139abfaa3553db61d1474 (patch)
tree5d2b662c62b42027d64292b6229edecdb2dd782b /install
parente270bd3874bb4526138cc06cd26e2a1153778894 (diff)
downloadvolse-hubzilla-3767bba3c3669b6e882139abfaa3553db61d1474.tar.gz
volse-hubzilla-3767bba3c3669b6e882139abfaa3553db61d1474.tar.bz2
volse-hubzilla-3767bba3c3669b6e882139abfaa3553db61d1474.zip
beginning of backend file/attachment api
Diffstat (limited to 'install')
-rw-r--r--install/database.sql7
-rw-r--r--install/update.php8
2 files changed, 13 insertions, 2 deletions
diff --git a/install/database.sql b/install/database.sql
index aee87c119..ba063bfa4 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -94,7 +94,12 @@ CREATE TABLE IF NOT EXISTS `attach` (
PRIMARY KEY (`id`),
KEY `aid` (`aid`),
KEY `uid` (`uid`),
- KEY `hash` (`hash`)
+ KEY `hash` (`hash`),
+ KEY `filename` (`filename`),
+ KEY `filetype` (`filetype`),
+ KEY `filesize` (`filesize`),
+ KEY `created` (`created`),
+ KEY `edited` (`edited`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `auth_codes` (
diff --git a/install/update.php b/install/update.php
index 41c6a7565..b0eed4818 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1022 );
+define( 'UPDATE_VERSION' , 1023 );
/**
*
@@ -303,3 +303,9 @@ function update_r1021() {
return UPDATE_FAILED;
}
+function update_r1022() {
+ $r = q("alter table attach add index ( filename ), add index ( filetype ), add index ( filesize ), add index ( created ), add index ( edited ) ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}