aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2013-11-12 02:09:32 -0800
committerPaolo T <tuscanhobbit@users.noreply.github.com>2013-11-12 02:09:32 -0800
commit67a101452b82782114143dc0b5bdba15adc0ba99 (patch)
tree9daee3807b370d02ee4c28e6df7db08731fbb9f1 /install
parentb23f3fc03b6bc751aab67fe2258a21f7c65bab8e (diff)
parent7cb4c2f8ad813336aafdec05e40f3a8eb1808d00 (diff)
downloadvolse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.tar.gz
volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.tar.bz2
volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.zip
Merge pull request #4 from friendica/master
Fork aligned to red master
Diffstat (limited to 'install')
-rw-r--r--install/database.sql38
-rwxr-xr-xinstall/htconfig.sample.php11
-rw-r--r--install/update.php25
3 files changed, 56 insertions, 18 deletions
diff --git a/install/database.sql b/install/database.sql
index 3998c13c7..3a05c28ec 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -155,6 +155,7 @@ CREATE TABLE IF NOT EXISTS `channel` (
`channel_prvkey` text NOT NULL,
`channel_notifyflags` int(10) unsigned NOT NULL DEFAULT '65535',
`channel_pageflags` int(10) unsigned NOT NULL DEFAULT '0',
+ `channel_dirdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`channel_deleted` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`channel_max_anon_mail` int(10) unsigned NOT NULL DEFAULT '10',
`channel_max_friend_req` int(10) unsigned NOT NULL DEFAULT '10',
@@ -181,7 +182,7 @@ CREATE TABLE IF NOT EXISTS `channel` (
`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',
- `channel_a_republish` int(1) unsigned NOT NULL DEFAULT '128',
+ `channel_a_republish` int(10) unsigned NOT NULL DEFAULT '128',
PRIMARY KEY (`channel_id`),
UNIQUE KEY `channel_address_unique` (`channel_address`),
KEY `channel_account_id` (`channel_account_id`),
@@ -214,8 +215,9 @@ CREATE TABLE IF NOT EXISTS `channel` (
KEY `channel_w_storage` (`channel_w_storage`),
KEY `channel_r_pages` (`channel_r_pages`),
KEY `channel_w_pages` (`channel_w_pages`),
+ KEY `channel_deleted` (`channel_deleted`),
KEY `channel_a_republish` (`channel_a_republish`),
- KEY `channel_deleted` (`channel_deleted`)
+ KEY `channel_dirdate` (`channel_dirdate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `clients` (
@@ -350,7 +352,7 @@ CREATE TABLE IF NOT EXISTS `group_member` (
KEY `uid` (`uid`),
KEY `gid` (`gid`),
KEY `xchan` (`xchan`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `hook` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -382,12 +384,12 @@ CREATE TABLE IF NOT EXISTS `hubloc` (
KEY `hubloc_url` (`hubloc_url`),
KEY `hubloc_guid` (`hubloc_guid`),
KEY `hubloc_flags` (`hubloc_flags`),
- KEY `hubloc_status` (`hubloc_status`),
KEY `hubloc_connect` (`hubloc_connect`),
KEY `hubloc_host` (`hubloc_host`),
KEY `hubloc_addr` (`hubloc_addr`),
KEY `hubloc_updated` (`hubloc_updated`),
- KEY `hubloc_connected` (`hubloc_connected`)
+ KEY `hubloc_connected` (`hubloc_connected`),
+ KEY `hubloc_status` (`hubloc_status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `issue` (
@@ -442,7 +444,7 @@ CREATE TABLE IF NOT EXISTS `item` (
`resource_id` char(255) NOT NULL DEFAULT '',
`resource_type` char(16) NOT NULL DEFAULT '',
`attach` mediumtext NOT NULL,
- `sig` text NOT NULL DEFAULT '',
+ `sig` text NOT NULL,
`location` char(255) NOT NULL DEFAULT '',
`coord` char(255) NOT NULL DEFAULT '',
`comment_policy` char(255) NOT NULL DEFAULT '',
@@ -498,7 +500,7 @@ CREATE TABLE IF NOT EXISTS `item_id` (
KEY `sid` (`sid`),
KEY `service` (`service`),
KEY `iid` (`iid`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `mail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -513,6 +515,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
`mid` char(255) NOT NULL,
`parent_mid` char(255) NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `created` (`created`),
KEY `mail_flags` (`mail_flags`),
@@ -521,7 +524,8 @@ CREATE TABLE IF NOT EXISTS `mail` (
KEY `from_xchan` (`from_xchan`),
KEY `to_xchan` (`to_xchan`),
KEY `mid` (`mid`),
- KEY `parent_mid` (`parent_mid`)
+ KEY `parent_mid` (`parent_mid`),
+ KEY `expires` (`expires`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `manage` (
@@ -830,12 +834,13 @@ CREATE TABLE IF NOT EXISTS `site` (
`site_directory` char(255) NOT NULL DEFAULT '',
`site_register` int(11) NOT NULL DEFAULT '0',
`site_sellpage` char(255) NOT NULL DEFAULT '',
+ `site_location` char(255) NOT NULL DEFAULT '',
PRIMARY KEY (`site_url`),
- KEY `site_access` (`site_access`),
KEY `site_flags` (`site_flags`),
KEY `site_update` (`site_update`),
KEY `site_directory` (`site_directory`),
KEY `site_register` (`site_register`),
+ KEY `site_access` (`site_access`),
KEY `site_sellpage` (`site_sellpage`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -849,7 +854,7 @@ CREATE TABLE IF NOT EXISTS `source` (
KEY `src_channel_id` (`src_channel_id`),
KEY `src_channel_xchan` (`src_channel_xchan`),
KEY `src_xchan` (`src_xchan`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `spam` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -887,7 +892,7 @@ CREATE TABLE IF NOT EXISTS `term` (
KEY `imgurl` (`imgurl`),
KEY `term_hash` (`term_hash`),
KEY `parent_hash` (`parent_hash`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tokens` (
`id` varchar(40) NOT NULL,
@@ -911,13 +916,13 @@ CREATE TABLE IF NOT EXISTS `updates` (
`ud_flags` int(11) NOT NULL DEFAULT '0',
`ud_addr` char(255) NOT NULL DEFAULT '',
PRIMARY KEY (`ud_id`),
- KEY `ud_hash` (`ud_hash`),
- KEY `ud_guid` (`ud_guid`),
KEY `ud_date` (`ud_date`),
+ KEY `ud_guid` (`ud_guid`),
+ KEY `ud_hash` (`ud_hash`),
KEY `ud_flags` (`ud_flags`),
KEY `ud_addr` (`ud_addr`),
KEY `ud_last` (`ud_last`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `verify` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -974,9 +979,8 @@ CREATE TABLE IF NOT EXISTS `xchan` (
KEY `xchan_url` (`xchan_url`),
KEY `xchan_flags` (`xchan_flags`),
KEY `xchan_connurl` (`xchan_connurl`),
- KEY `xchan_follow` (`xchan_follow`),
- KEY `xchan_connpage` (`xchan_connpage`),
- KEY `xchan_instance_url` (`xchan_instance_url`)
+ KEY `xchan_instance_url` (`xchan_instance_url`),
+ KEY `xchan_follow` (`xchan_follow`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `xconfig` (
diff --git a/install/htconfig.sample.php b/install/htconfig.sample.php
index 14ae23676..33258cf41 100755
--- a/install/htconfig.sample.php
+++ b/install/htconfig.sample.php
@@ -71,3 +71,14 @@ $a->config['system']['php_path'] = 'php';
$a->config['system']['directory_mode'] = DIRECTORY_MODE_NORMAL;
+
+// PHP error logging setup
+// Before doing this ensure that the webserver has permission
+// to create and write to php.out in the top level Red directory,
+// or change the name (below) to a file/path where this is allowed.
+
+// Uncomment the following 4 lines to turn on PHP error logging.
+//error_reporting(E_ERROR | E_WARNING | E_PARSE );
+//ini_set('error_log','php.out');
+//ini_set('log_errors','1');
+//ini_set('display_errors', '0');
diff --git a/install/update.php b/install/update.php
index 74134f260..e1fd8c7a4 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1078 );
+define( 'UPDATE_VERSION' , 1081 );
/**
*
@@ -873,3 +873,26 @@ function update_r1077() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
+function update_r1078() {
+ $r = q("ALTER TABLE `channel` ADD `channel_dirdate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `channel_pageflags` , ADD INDEX ( `channel_dirdate` )");
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1079() {
+ $r = q("ALTER TABLE `site` ADD `site_location` CHAR( 255 ) NOT NULL DEFAULT ''");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1080() {
+ $r = q("ALTER TABLE `mail` ADD `expires` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
+ADD INDEX ( `expires` ) ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}