diff options
author | friendica <info@friendica.com> | 2013-06-04 17:46:21 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-06-04 17:46:21 -0700 |
commit | 0deec983b475f30269cbf34606ec93fbad36a4a5 (patch) | |
tree | c5b26aa37b551aec4ba4a9324d04c45eddb84dd0 /install/update.php | |
parent | 9f15600c7c426c4f557809ed2036802381e5bf12 (diff) | |
download | volse-hubzilla-0deec983b475f30269cbf34606ec93fbad36a4a5.tar.gz volse-hubzilla-0deec983b475f30269cbf34606ec93fbad36a4a5.tar.bz2 volse-hubzilla-0deec983b475f30269cbf34606ec93fbad36a4a5.zip |
DB: add timestamps to hubloc table so we can eventually expire dead entries.
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php index 8a225867e..382e8723c 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1042 ); +define( 'UPDATE_VERSION' , 1043 ); /** * @@ -531,3 +531,13 @@ function update_r1041() { return UPDATE_FAILED; } + +function update_r1042() { + $r = q("ALTER TABLE `hubloc` ADD `hubloc_updated` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', +ADD `hubloc_connected` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', ADD INDEX ( `hubloc_updated` ), ADD INDEX ( `hubloc_connected` )"); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + + |