photo_flags - for adding taxonomy photos and other stuff.

This commit is contained in:
friendica 2013-07-16 04:46:01 -07:00
parent 26fa2b105d
commit de734bbea8
3 changed files with 12 additions and 2 deletions

View File

@ -43,7 +43,7 @@ require_once('include/taxonomy.php');
define ( 'RED_PLATFORM', 'Red Matrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1051 );
define ( 'DB_UPDATE_VERSION', 1052 );
define ( 'EOL', '<br />' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View File

@ -665,6 +665,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
`data` mediumblob NOT NULL,
`scale` tinyint(3) NOT NULL,
`profile` tinyint(1) NOT NULL DEFAULT '0',
`photo_flags` int(10) unsigned NOT NULL DEFAULT '0',
`allow_cid` mediumtext NOT NULL,
`allow_gid` mediumtext NOT NULL,
`deny_cid` mediumtext NOT NULL,
@ -674,6 +675,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
KEY `album` (`album`),
KEY `scale` (`scale`),
KEY `profile` (`profile`),
KEY `photo_flags` (`photo_flags`),
KEY `type` (`type`),
KEY `aid` (`aid`),
KEY `xchan` (`xchan`),

View File

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1051 );
define( 'UPDATE_VERSION' , 1052 );
/**
*
@ -618,3 +618,11 @@ function update_r1050() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
function update_r1051() {
$r = q("ALTER TABLE `photo` ADD `photo_flags` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `profile` , ADD INDEX ( `photo_flags` ) ");
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}