beginning of backend file/attachment api
This commit is contained in:
@@ -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` (
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user