aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-12-10 13:44:54 -0800
committerfriendica <info@friendica.com>2012-12-10 13:44:54 -0800
commitb0970850d4e3facac26debe54f34edc21bca1ff7 (patch)
tree295b1ecee96d1e641c842923a39f553e2ed802c5 /install
parentc066793554cf5a779b791df8a9fe93461f1598a4 (diff)
downloadvolse-hubzilla-b0970850d4e3facac26debe54f34edc21bca1ff7.tar.gz
volse-hubzilla-b0970850d4e3facac26debe54f34edc21bca1ff7.tar.bz2
volse-hubzilla-b0970850d4e3facac26debe54f34edc21bca1ff7.zip
Allow forum/account delegation by anybody? On any site? But of course...
Diffstat (limited to 'install')
-rw-r--r--install/database.sql4
-rw-r--r--install/update.php10
2 files changed, 11 insertions, 3 deletions
diff --git a/install/database.sql b/install/database.sql
index 36b1003ae..182d02432 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -158,6 +158,7 @@ CREATE TABLE IF NOT EXISTS `channel` (
`channel_w_mail` tinyint(3) unsigned NOT NULL DEFAULT '128',
`channel_w_photos` tinyint(3) unsigned NOT NULL DEFAULT '128',
`channel_w_chat` tinyint(3) unsigned NOT NULL DEFAULT '128',
+ `channel_a_delegate` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`channel_id`),
KEY `channel_account_id` (`channel_account_id`),
KEY `channel_primary` (`channel_primary`),
@@ -184,7 +185,8 @@ CREATE TABLE IF NOT EXISTS `channel` (
KEY `channel_w_chat` (`channel_w_chat`),
KEY `channel_guid` (`channel_guid`),
KEY `channel_hash` (`channel_hash`),
- KEY `channel_expire_days` (`channel_expire_days`)
+ KEY `channel_expire_days` (`channel_expire_days`),
+ KEY `channel_a_delegate` (`channel_a_delegate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `clients` (
diff --git a/install/update.php b/install/update.php
index cb3396b19..edd4701a1 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1000 );
+define( 'UPDATE_VERSION' , 1001 );
/**
*
@@ -35,5 +35,11 @@ define( 'UPDATE_VERSION' , 1000 );
*
*/
-// function update_r1000()
+function update_r1000() {
+ $r = q("ALTER TABLE `channel` ADD `channel_a_delegate` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0', ADD INDEX ( `channel_a_delegate` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+