beginning of backend file/attachment api

This commit is contained in:
friendica
2013-01-30 17:27:32 -08:00
parent e270bd3874
commit 3767bba3c3
6 changed files with 92 additions and 7 deletions

View File

@@ -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` (

View File

@@ -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;
}