diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/database.sql | 2 | ||||
-rw-r--r-- | install/update.php | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/install/database.sql b/install/database.sql index 2791f94be..104f145e5 100644 --- a/install/database.sql +++ b/install/database.sql @@ -442,6 +442,7 @@ CREATE TABLE IF NOT EXISTS `hubloc` ( `hubloc_guid_sig` text NOT NULL, `hubloc_hash` char(255) NOT NULL, `hubloc_addr` char(255) NOT NULL DEFAULT '', + `hubloc_network` char(32) 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 '', @@ -459,6 +460,7 @@ CREATE TABLE IF NOT EXISTS `hubloc` ( KEY `hubloc_connect` (`hubloc_connect`), KEY `hubloc_host` (`hubloc_host`), KEY `hubloc_addr` (`hubloc_addr`), + KEY `hubloc_network` (`hubloc_network`), KEY `hubloc_updated` (`hubloc_updated`), KEY `hubloc_connected` (`hubloc_connected`), KEY `hubloc_status` (`hubloc_status`) diff --git a/install/update.php b/install/update.php index f7d6441dc..9e184428e 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1123 ); +define( 'UPDATE_VERSION' , 1124 ); /** * @@ -1377,3 +1377,15 @@ function update_r1122() { return UPDATE_SUCCESS; return UPDATE_FAILED; } + +function update_r1123() { + $r1 = q("ALTER TABLE `hubloc` ADD `hubloc_network` CHAR( 32 ) NOT NULL DEFAULT '' AFTER `hubloc_addr` , +ADD INDEX ( `hubloc_network` )"); + $r2 = q("update hubloc set hubloc_network = 'zot' where true"); + + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + + |