aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/database.sql37
-rw-r--r--install/update.php61
2 files changed, 85 insertions, 13 deletions
diff --git a/install/database.sql b/install/database.sql
index cd31a0285..cbfca822c 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -160,18 +160,18 @@ CREATE TABLE IF NOT EXISTS `channel` (
`channel_allow_gid` mediumtext NOT NULL,
`channel_deny_cid` mediumtext NOT NULL,
`channel_deny_gid` mediumtext NOT NULL,
- `channel_r_stream` tinyint(3) unsigned NOT NULL DEFAULT '128',
- `channel_r_profile` tinyint(3) unsigned NOT NULL DEFAULT '128',
- `channel_r_photos` tinyint(3) unsigned NOT NULL DEFAULT '128',
- `channel_r_abook` tinyint(3) unsigned NOT NULL DEFAULT '128',
- `channel_w_stream` tinyint(3) unsigned NOT NULL DEFAULT '128',
- `channel_w_wall` tinyint(3) unsigned NOT NULL DEFAULT '128',
- `channel_w_tagwall` tinyint(3) unsigned NOT NULL DEFAULT '128',
- `channel_w_comment` tinyint(3) unsigned NOT NULL DEFAULT '128',
- `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',
+ `channel_r_stream` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_r_profile` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_r_photos` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_r_abook` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_w_stream` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_w_wall` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_w_tagwall` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_w_comment` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_w_mail` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_w_photos` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_w_chat` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_a_delegate` int(10) 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',
@@ -1027,6 +1027,19 @@ CREATE TABLE IF NOT EXISTS `xchan` (
KEY `xchan_follow` (`xchan_follow`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE IF NOT EXISTS `xchat` (
+ `xchat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `xchat_url` char(255) NOT NULL DEFAULT '',
+ `xchat_desc` char(255) NOT NULL DEFAULT '',
+ `xchat_xchan` char(255) NOT NULL DEFAULT '',
+ `xchat_edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`xchat_id`),
+ KEY `xchat_url` (`xchat_url`),
+ KEY `xchat_desc` (`xchat_desc`),
+ KEY `xchat_xchan` (`xchat_xchan`),
+ KEY `xchat_edited` (`xchat_edited`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
CREATE TABLE IF NOT EXISTS `xconfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`xchan` char(255) NOT NULL,
diff --git a/install/update.php b/install/update.php
index 7d1305863..11b1c1da6 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1098 );
+define( 'UPDATE_VERSION' , 1103 );
/**
*
@@ -1099,4 +1099,63 @@ function update_r1097() {
}
return UPDATE_SUCCESS;
+}
+
+function update_r1098() {
+ $r = q("ALTER TABLE `channel` CHANGE `channel_r_stream` `channel_r_stream` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r2 = q("ALTER TABLE `channel` CHANGE `channel_r_profile` `channel_r_profile` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r3 = q("ALTER TABLE `channel` CHANGE `channel_r_photos` `channel_r_photos` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r4 = q("ALTER TABLE `channel` CHANGE `channel_r_abook` `channel_r_abook` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r4 = q("ALTER TABLE `channel` CHANGE `channel_w_stream` `channel_w_stream` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r5 = q("ALTER TABLE `channel` CHANGE `channel_w_wall` `channel_w_wall` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r6 = q("ALTER TABLE `channel` CHANGE `channel_w_tagwall` `channel_w_tagwall` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r7 = q("ALTER TABLE `channel` CHANGE `channel_w_comment` `channel_w_comment` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r8 = q("ALTER TABLE `channel` CHANGE `channel_w_mail` `channel_w_mail` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r9 = q("ALTER TABLE `channel` CHANGE `channel_w_photos` `channel_w_photos` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r10 = q("ALTER TABLE `channel` CHANGE `channel_w_chat` `channel_w_chat` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ $r11 = q("ALTER TABLE `channel` CHANGE `channel_a_delegate` `channel_a_delegate` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ if($r && $r2 && $r3 && $r3 && $r5 && $r6 && $r7 && $r8 && $r9 && $r9 && $r10 && $r11)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1099() {
+ $r = q("CREATE TABLE IF NOT EXISTS `xchat` (
+ `xchat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `xchat_url` char(255) NOT NULL DEFAULT '',
+ `xchat_desc` char(255) NOT NULL DEFAULT '',
+ `xchat_xchan` char(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`xchat_id`),
+ KEY `xchat_url` (`xchat_url`),
+ KEY `xchat_desc` (`xchat_desc`),
+ KEY `xchat_xchan` (`xchat_xchan`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 ");
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1100() {
+ $r = q("ALTER TABLE `xchat` ADD `xchat_edited` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
+ADD INDEX ( `xchat_edited` ) ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+
+function update_r1101() {
+ $r = q("update updates set ud_flags = 2 where ud_flags = (-1)");
+ $r = q("update updates set ud_flags = 0 where ud_flags = 4096");
+ return UPDATE_SUCCESS;
+}
+
+function update_r1102() {
+ $r = q("update abook set abook_flags = (abook_flags - %d)
+ where ( abook_flags & %d)",
+ intval(ABOOK_FLAG_UNCONNECTED),
+ intval(ABOOK_FLAG_UNCONNECTED)
+ );
+ return UPDATE_SUCCESS;
} \ No newline at end of file