diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/INSTALL.txt | 25 | ||||
-rw-r--r-- | install/database.sql | 122 | ||||
-rw-r--r-- | install/update.php | 179 |
3 files changed, 300 insertions, 26 deletions
diff --git a/install/INSTALL.txt b/install/INSTALL.txt index 89b53c7c0..3c3e795d7 100644 --- a/install/INSTALL.txt +++ b/install/INSTALL.txt @@ -80,6 +80,13 @@ directory/path component in the URL) is REQUIRED. chmod 777 view/tpl/smarty3 + [This permission (777) is very dangerous and if you have sufficient + privilege and knowledge you should make this directory writeable only + by the webserver. In many shared hosting environments this may be + difficult without opening a trouble ticket with your provider. The + above permissions will allow the software to work, but are not + optimal.] + - For installing addons - First you should be **on** your website folder @@ -96,6 +103,24 @@ directory/path component in the URL) is REQUIRED. git pull + - If you wish to use WebDAV file services + + - First you should be **on** your website folder + + cd mywebsite + + - Then you should clone the sabre-dav repository (separately) + + git clone https://github.com/fruux/sabre-dav sabre + + - For keeping the sabre tree updated, you should be on you sabre tree and issue a git pull + + cd mywebsite/sabre + + git pull + + + 3. Create an empty database and note the access details (hostname, username, password, database name). diff --git a/install/database.sql b/install/database.sql index 4a519adbb..6be3a31aa 100644 --- a/install/database.sql +++ b/install/database.sql @@ -136,7 +136,7 @@ CREATE TABLE IF NOT EXISTS `challenge` ( `type` char(255) NOT NULL, `last_update` char(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `channel` ( `channel_id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -181,6 +181,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', PRIMARY KEY (`channel_id`), UNIQUE KEY `channel_address_unique` (`channel_address`), KEY `channel_account_id` (`channel_account_id`), @@ -213,6 +214,7 @@ 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_a_republish` (`channel_a_republish`), KEY `channel_deleted` (`channel_deleted`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -267,7 +269,7 @@ CREATE TABLE IF NOT EXISTS `event` ( KEY `aid` (`aid`), KEY `event_hash` (`event_hash`), KEY `event_xchan` (`event_xchan`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `fcontact` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -348,7 +350,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, @@ -367,6 +369,7 @@ CREATE TABLE IF NOT EXISTS `hubloc` ( `hubloc_hash` char(255) NOT NULL, `hubloc_addr` char(255) NOT NULL DEFAULT '', `hubloc_flags` int(10) unsigned NOT NULL DEFAULT '0', + `hubloc_status` int(10) unsigned NOT NULL DEFAULT '0', `hubloc_url` char(255) NOT NULL DEFAULT '', `hubloc_url_sig` text NOT NULL, `hubloc_host` char(255) NOT NULL DEFAULT '', @@ -379,6 +382,7 @@ 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`), @@ -408,7 +412,6 @@ CREATE TABLE IF NOT EXISTS `item` ( `mid` char(255) CHARACTER SET ascii NOT NULL DEFAULT '', `aid` int(10) unsigned NOT NULL DEFAULT '0', `uid` int(10) unsigned NOT NULL DEFAULT '0', - `wall` tinyint(1) NOT NULL DEFAULT '0', `parent` int(10) unsigned NOT NULL DEFAULT '0', `parent_mid` char(255) CHARACTER SET ascii NOT NULL DEFAULT '', `thr_parent` char(255) NOT NULL DEFAULT '', @@ -421,7 +424,7 @@ CREATE TABLE IF NOT EXISTS `item` ( `owner_xchan` char(255) NOT NULL DEFAULT '', `author_xchan` char(255) NOT NULL DEFAULT '', `mimetype` char(255) NOT NULL DEFAULT '', - `title` text NOT NULL DEFAULT '', + `title` text NOT NULL, `body` mediumtext NOT NULL, `app` char(255) NOT NULL DEFAULT '', `lang` char(64) NOT NULL DEFAULT '', @@ -431,13 +434,14 @@ CREATE TABLE IF NOT EXISTS `item` ( `object` text NOT NULL, `tgt_type` char(255) NOT NULL DEFAULT '', `target` text NOT NULL, + `layout_mid` char(255) NOT NULL DEFAULT '', `postopts` text NOT NULL, `llink` char(255) NOT NULL DEFAULT '', `plink` char(255) NOT NULL DEFAULT '', `resource_id` char(255) NOT NULL DEFAULT '', `resource_type` char(16) NOT NULL DEFAULT '', `attach` mediumtext NOT NULL, - `inform` mediumtext NOT NULL, + `sig` text NOT NULL DEFAULT '', `location` char(255) NOT NULL DEFAULT '', `coord` char(255) NOT NULL DEFAULT '', `comment_policy` char(255) NOT NULL DEFAULT '', @@ -454,7 +458,6 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `created` (`created`), KEY `edited` (`edited`), KEY `received` (`received`), - KEY `wall` (`wall`), KEY `uid_commented` (`uid`,`commented`), KEY `uid_created` (`uid`,`created`), KEY `aid` (`aid`), @@ -474,6 +477,7 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `parent_mid` (`parent_mid`), KEY `uid_mid` (`mid`,`uid`), KEY `comment_policy` (`comment_policy`), + KEY `layout_mid` (`layout_mid`), FULLTEXT KEY `title` (`title`), FULLTEXT KEY `body` (`body`), FULLTEXT KEY `allow_cid` (`allow_cid`), @@ -493,7 +497,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, @@ -504,7 +508,7 @@ CREATE TABLE IF NOT EXISTS `mail` ( `channel_id` int(10) unsigned NOT NULL, `title` text NOT NULL, `body` mediumtext NOT NULL, - `attach` mediumtext NOT NULL DEFAULT '', + `attach` mediumtext NOT NULL, `mid` char(255) NOT NULL, `parent_mid` char(255) NOT NULL, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', @@ -536,7 +540,7 @@ CREATE TABLE IF NOT EXISTS `menu` ( PRIMARY KEY (`menu_id`), KEY `menu_channel_id` (`menu_channel_id`), KEY `menu_name` (`menu_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `menu_item` ( `mitem_id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -551,10 +555,10 @@ CREATE TABLE IF NOT EXISTS `menu_item` ( `mitem_menu_id` int(10) unsigned NOT NULL DEFAULT '0', `mitem_order` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`mitem_id`), - KEY `mitem_flags` (`mitem_flags`), KEY `mitem_channel_id` (`mitem_channel_id`), - KEY `mitem_menu_id` (`mitem_menu_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; + KEY `mitem_menu_id` (`mitem_menu_id`), + KEY `mitem_flags` (`mitem_flags`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `notify` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -595,7 +599,7 @@ CREATE TABLE IF NOT EXISTS `obj` ( KEY `obj_type` (`obj_type`), KEY `obj_channel` (`obj_channel`), KEY `obj_obj` (`obj_obj`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `outq` ( `outq_hash` char(255) NOT NULL, @@ -658,7 +662,7 @@ CREATE TABLE IF NOT EXISTS `photo` ( KEY `album` (`album`), KEY `scale` (`scale`), KEY `profile` (`profile`), - KEY `photo_flags` (`photo_flags`), + KEY `photo_flags` (`photo_flags`), KEY `type` (`type`), KEY `aid` (`aid`), KEY `xchan` (`xchan`), @@ -666,6 +670,29 @@ CREATE TABLE IF NOT EXISTS `photo` ( KEY `resource_id` (`resource_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `poll` ( + `poll_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `poll_channel` int(10) unsigned NOT NULL DEFAULT '0', + `poll_desc` text NOT NULL, + `poll_flags` int(11) NOT NULL DEFAULT '0', + `poll_votes` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`poll_id`), + KEY `poll_channel` (`poll_channel`), + KEY `poll_flags` (`poll_flags`), + KEY `poll_votes` (`poll_votes`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `poll_elm` ( + `pelm_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `pelm_poll` int(10) unsigned NOT NULL DEFAULT '0', + `pelm_desc` text NOT NULL, + `pelm_flags` int(11) NOT NULL DEFAULT '0', + `pelm_result` float NOT NULL DEFAULT '0', + PRIMARY KEY (`pelm_id`), + KEY `pelm_poll` (`pelm_poll`), + KEY `pelm_result` (`pelm_result`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `profile` ( `id` int(11) NOT NULL AUTO_INCREMENT, `profile_guid` char(64) NOT NULL DEFAULT '', @@ -676,7 +703,7 @@ CREATE TABLE IF NOT EXISTS `profile` ( `hide_friends` tinyint(1) NOT NULL DEFAULT '0', `name` char(255) NOT NULL, `pdesc` char(255) NOT NULL, - `chandesc` text NOT NULL DEFAULT '', + `chandesc` text NOT NULL, `dob` char(32) NOT NULL DEFAULT '0000-00-00', `dob_tz` char(255) NOT NULL DEFAULT 'UTC', `address` char(255) NOT NULL, @@ -770,7 +797,7 @@ CREATE TABLE IF NOT EXISTS `register` ( KEY `hash` (`hash`), KEY `created` (`created`), KEY `uid` (`uid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `session` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, @@ -795,15 +822,32 @@ CREATE TABLE IF NOT EXISTS `shares` ( CREATE TABLE IF NOT EXISTS `site` ( `site_url` char(255) NOT NULL, + `site_access` int(11) NOT NULL DEFAULT '0', `site_flags` int(11) NOT NULL DEFAULT '0', `site_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `site_sync` datetime NOT NULL, `site_directory` char(255) NOT NULL DEFAULT '', `site_register` int(11) NOT NULL DEFAULT '0', + `site_sellpage` 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_register` (`site_register`), + KEY `site_sellpage` (`site_sellpage`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `source` ( + `src_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `src_channel_id` int(10) unsigned NOT NULL DEFAULT '0', + `src_channel_xchan` char(255) NOT NULL DEFAULT '', + `src_xchan` char(255) NOT NULL DEFAULT '', + `src_patt` mediumtext NOT NULL, + PRIMARY KEY (`src_id`), + KEY `src_channel_id` (`src_channel_id`), + KEY `src_channel_xchan` (`src_channel_xchan`), + KEY `src_xchan` (`src_xchan`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `spam` ( @@ -842,7 +886,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, @@ -858,10 +902,20 @@ CREATE TABLE IF NOT EXISTS `tokens` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `updates` ( + `ud_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ud_hash` char(128) NOT NULL, + `ud_guid` char(255) NOT NULL DEFAULT '', `ud_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (`ud_hash`), - KEY `ud_date` (`ud_date`) + `ud_last` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `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_flags` (`ud_flags`), + KEY `ud_addr` (`ud_addr`), + KEY `ud_last` (`ud_last`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `verify` ( @@ -877,7 +931,19 @@ CREATE TABLE IF NOT EXISTS `verify` ( KEY `token` (`token`), KEY `meta` (`meta`), KEY `created` (`created`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `vote` ( + `vote_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `vote_poll` int(11) NOT NULL DEFAULT '0', + `vote_element` int(11) NOT NULL DEFAULT '0', + `vote_result` text NOT NULL, + `vote_xchan` char(255) NOT NULL DEFAULT '', + PRIMARY KEY (`vote_id`), + UNIQUE KEY `vote_vote` (`vote_poll`,`vote_element`,`vote_xchan`), + KEY `vote_poll` (`vote_poll`), + KEY `vote_element` (`vote_element`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `xchan` ( `xchan_hash` char(255) NOT NULL, @@ -891,6 +957,8 @@ CREATE TABLE IF NOT EXISTS `xchan` ( `xchan_addr` char(255) NOT NULL DEFAULT '', `xchan_url` char(255) NOT NULL DEFAULT '', `xchan_connurl` char(255) NOT NULL DEFAULT '', + `xchan_follow` char(255) NOT NULL DEFAULT '', + `xchan_connpage` char(255) NOT NULL DEFAULT '', `xchan_name` char(255) NOT NULL DEFAULT '', `xchan_network` char(255) NOT NULL DEFAULT '', `xchan_instance_url` char(255) NOT NULL DEFAULT '', @@ -902,10 +970,12 @@ CREATE TABLE IF NOT EXISTS `xchan` ( KEY `xchan_addr` (`xchan_addr`), KEY `xchan_name` (`xchan_name`), KEY `xchan_network` (`xchan_network`), - KEY `xchan_instance_url` (`xchan_instance_url`), KEY `xchan_url` (`xchan_url`), KEY `xchan_flags` (`xchan_flags`), - KEY `xchan_connurl` (`xchan_connurl`) + KEY `xchan_connurl` (`xchan_connurl`), + KEY `xchan_follow` (`xchan_follow`), + KEY `xchan_connpage` (`xchan_connpage`), + KEY `xchan_instance_url` (`xchan_instance_url`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `xconfig` ( @@ -972,7 +1042,9 @@ CREATE TABLE IF NOT EXISTS `xtag` ( `xtag_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `xtag_hash` char(255) NOT NULL, `xtag_term` char(255) NOT NULL DEFAULT '', + `xtag_flags` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`xtag_id`), KEY `xtag_term` (`xtag_term`), - KEY `xtag_hash` (`xtag_hash`) + KEY `xtag_hash` (`xtag_hash`), + KEY `xtag_flags` (`xtag_flags`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/install/update.php b/install/update.php index 682ee2aea..20af0de45 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1060 ); +define( 'UPDATE_VERSION' , 1077 ); /** * @@ -689,3 +689,180 @@ function update_r1059() { return UPDATE_SUCCESS; return UPDATE_FAILED; } + +function update_r1060() { + + $r = q("CREATE TABLE IF NOT EXISTS `vote` ( + `vote_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `vote_poll` int(11) NOT NULL DEFAULT '0', + `vote_element` int(11) NOT NULL DEFAULT '0', + `vote_result` text NOT NULL, + `vote_xchan` char(255) NOT NULL DEFAULT '', + PRIMARY KEY (`vote_id`), + UNIQUE KEY `vote_vote` (`vote_poll`,`vote_element`,`vote_xchan`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 "); + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1061() { + $r = q("ALTER TABLE `vote` ADD INDEX ( `vote_poll` ), ADD INDEX ( `vote_element` ) "); + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1062() { + $r1 = q("CREATE TABLE IF NOT EXISTS `poll` ( +`poll_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , +`poll_channel` INT UNSIGNED NOT NULL DEFAULT '0', +`poll_desc` TEXT NOT NULL DEFAULT '', +`poll_flags` INT NOT NULL DEFAULT '0', +`poll_votes` INT NOT NULL DEFAULT '0', +KEY `poll_channel` (`poll_channel`), +KEY `poll_flags` (`poll_flags`), +KEY `poll_votes` (`poll_votes`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 "); + + $r2 = q("CREATE TABLE IF NOT EXISTS `poll_elm` ( +`pelm_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , +`pelm_poll` INT UNSIGNED NOT NULL DEFAULT '0', +`pelm_desc` TEXT NOT NULL DEFAULT '', +`pelm_flags` INT NOT NULL DEFAULT '0', +`pelm_result` FLOAT NOT NULL DEFAULT '0', +KEY `pelm_poll` (`pelm_poll`), +KEY `pelm_result` (`pelm_result`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 "); + + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1063() { + $r = q("ALTER TABLE `xchan` ADD `xchan_follow` CHAR( 255 ) NOT NULL DEFAULT '' AFTER `xchan_connurl` , +ADD `xchan_connpage` CHAR( 255 ) NOT NULL DEFAULT '' AFTER `xchan_follow` , +ADD INDEX ( `xchan_follow` ), ADD INDEX ( `xchan_connpage`) "); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1064() { + $r = q("ALTER TABLE `updates` ADD `ud_guid` CHAR( 255 ) NOT NULL DEFAULT '' AFTER `ud_hash` , +ADD INDEX ( `ud_guid` )"); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1065() { + $r = q("ALTER TABLE `item` DROP `wall`, ADD `layout_mid` CHAR( 255 ) NOT NULL DEFAULT '' AFTER `target` , +ADD INDEX ( `layout_mid` ) "); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1066() { + $r = q("ALTER TABLE `site` ADD `site_access` INT NOT NULL DEFAULT '0' AFTER `site_url` , +ADD INDEX ( `site_access` )"); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1067() { + $r = q("ALTER TABLE `updates` DROP PRIMARY KEY , ADD `ud_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST, ADD INDEX ( `ud_hash` ) "); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1068(){ + $r = q("ALTER TABLE `hubloc` ADD `hubloc_status` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `hubloc_flags` , ADD INDEX ( `hubloc_status` )"); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1069() { + $r = q("ALTER TABLE `site` ADD `site_sellpage` CHAR( 255 ) NOT NULL DEFAULT '', +ADD INDEX ( `site_sellpage` )"); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1070() { + $r = q("ALTER TABLE `updates` ADD `ud_flags` INT NOT NULL DEFAULT '0', +ADD INDEX ( `ud_flags` )"); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1071() { + $r = q("ALTER TABLE `updates` ADD `ud_addr` CHAR( 255 ) NOT NULL DEFAULT '', +ADD INDEX ( `ud_addr` ) "); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1072() { + $r = q("ALTER TABLE `xtag` ADD `xtag_flags` INT NOT NULL DEFAULT '0', +ADD INDEX ( `xtag_flags` ) "); + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + + +function update_r1073() { + $r1 = q("CREATE TABLE IF NOT EXISTS `source` ( +`src_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , +`src_channel_id` INT UNSIGNED NOT NULL DEFAULT '0', +`src_channel_xchan` CHAR( 255 ) NOT NULL DEFAULT '', +`src_xchan` CHAR( 255 ) NOT NULL DEFAULT '', +`src_patt` MEDIUMTEXT NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 "); + + $r2 = q("ALTER TABLE `source` ADD INDEX ( `src_channel_id` ), ADD INDEX ( `src_channel_xchan` ), ADD INDEX ( `src_xchan` ) "); + + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1074() { + $r1 = q("ALTER TABLE `site` ADD `site_sync` DATETIME NOT NULL AFTER `site_update` "); + + $r2 = q("ALTER TABLE `updates` ADD `ud_last` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `ud_date` , +ADD INDEX ( `ud_last` ) "); + + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + + +function update_r1075() { + $r = q("ALTER TABLE `channel` ADD `channel_a_republish` INT UNSIGNED NOT NULL DEFAULT '128', +ADD INDEX ( `channel_a_republish` )"); + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1076() { + $r = q("ALTER TABLE `item` CHANGE `inform` `sig` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' "); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} |