aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php2
-rw-r--r--install/database.sql4
-rw-r--r--install/update.php10
3 files changed, 13 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index eb173d16a..7d9903843 100644
--- a/boot.php
+++ b/boot.php
@@ -16,7 +16,7 @@ require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica Red');
define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
-define ( 'DB_UPDATE_VERSION', 1027 );
+define ( 'DB_UPDATE_VERSION', 1028 );
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 de1d096b2..03279d6aa 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -14,6 +14,7 @@ CREATE TABLE IF NOT EXISTS `abook` (
`abook_my_perms` int(11) NOT NULL DEFAULT '0',
`abook_their_perms` int(11) NOT NULL DEFAULT '0',
`abook_closeness` tinyint(3) unsigned NOT NULL DEFAULT '99',
+ `abook_rating` int(11) NOT NULL DEFAULT '0',
`abook_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`abook_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`abook_connected` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -32,7 +33,8 @@ CREATE TABLE IF NOT EXISTS `abook` (
KEY `abook_flags` (`abook_flags`),
KEY `abook_profile` (`abook_profile`),
KEY `abook_dob` (`abook_dob`),
- KEY `abook_connected` (`abook_connected`)
+ KEY `abook_connected` (`abook_connected`),
+ KEY `abook_rating` (`abook_rating`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `account` (
diff --git a/install/update.php b/install/update.php
index d4d1bdf50..301d6e06f 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1027 );
+define( 'UPDATE_VERSION' , 1028 );
/**
*
@@ -342,3 +342,11 @@ ADD INDEX ( `mimetype` )");
}
+function update_r1027() {
+ $r = q("ALTER TABLE `abook` ADD `abook_rating` INT NOT NULL DEFAULT '0' AFTER `abook_closeness` ,
+ADD INDEX ( `abook_rating` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+