aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot.php2
-rw-r--r--install/database.sql2
-rw-r--r--install/update.php10
3 files changed, 12 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 695a8a96a..cf1a540dc 100755
--- a/boot.php
+++ b/boot.php
@@ -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' );
diff --git a/install/database.sql b/install/database.sql
index e7ca0e595..2a31ce0cf 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -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`),
diff --git a/install/update.php b/install/update.php
index f02676e2a..160d94a4d 100644
--- a/install/update.php
+++ b/install/update.php
@@ -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;
+}