aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/database.sql14
-rw-r--r--install/update.php12
2 files changed, 20 insertions, 6 deletions
diff --git a/install/database.sql b/install/database.sql
index a4d885541..da377fd5a 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -163,6 +163,8 @@ CREATE TABLE IF NOT EXISTS `channel` (
`channel_a_delegate` tinyint(3) unsigned NOT NULL DEFAULT '0',
`channel_r_storage` int(10) unsigned NOT NULL DEFAULT '128',
`channel_w_storage` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_r_pages` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_w_pages` int(10) unsigned NOT NULL DEFAULT '128',
PRIMARY KEY (`channel_id`),
KEY `channel_account_id` (`channel_account_id`),
KEY `channel_primary` (`channel_primary`),
@@ -192,7 +194,9 @@ CREATE TABLE IF NOT EXISTS `channel` (
KEY `channel_expire_days` (`channel_expire_days`),
KEY `channel_a_delegate` (`channel_a_delegate`),
KEY `channel_r_storage` (`channel_r_storage`),
- KEY `channel_w_storage` (`channel_w_storage`)
+ KEY `channel_w_storage` (`channel_w_storage`),
+ KEY `channel_r_pages` (`channel_r_pages`),
+ KEY `channel_w_pages` (`channel_w_pages`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `clients` (
@@ -563,7 +567,7 @@ CREATE TABLE IF NOT EXISTS `notify` (
KEY `parent` (`parent`),
KEY `link` (`link`),
KEY `otype` (`otype`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `outq` (
`outq_hash` char(255) NOT NULL,
@@ -852,9 +856,9 @@ CREATE TABLE IF NOT EXISTS `xlink` (
`xlink_link` char(255) NOT NULL DEFAULT '',
`xlink_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`xlink_id`),
- KEY `xlink_xchan` ( `xlink_xchan` ),
- KEY `xlink_link` ( `xlink_link` ),
- KEY `xlink_updated` ( `xlink_updated` )
+ KEY `xlink_xchan` (`xlink_xchan`),
+ KEY `xlink_link` (`xlink_link`),
+ KEY `xlink_updated` (`xlink_updated`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `xprof` (
diff --git a/install/update.php b/install/update.php
index cff3115a2..a43867ea6 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1015 );
+define( 'UPDATE_VERSION' , 1016 );
/**
*
@@ -219,3 +219,13 @@ function update_r1014() {
return UPDATE_FAILED;
}
+function update_r1015() {
+ $r = q("ALTER TABLE `channel` ADD `channel_r_pages` INT UNSIGNED NOT NULL DEFAULT '128',
+ADD `channel_w_pages` INT UNSIGNED NOT NULL DEFAULT '128'");
+
+ $r2 = q("ALTER TABLE `channel` ADD INDEX ( `channel_r_pages` ) , ADD INDEX ( `channel_w_pages` ) ");
+
+ if($r && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}