diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2011-08-26 14:44:24 +0200 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2011-08-26 14:44:24 +0200 |
commit | 5ec4a4e6deb5d28cbfab54093f8b4180912738d4 (patch) | |
tree | 653cb4738734d9f20bd1457c419105dcf235edea /update.php | |
parent | 97806544bcd7ee3831ffc515062afe0812828b76 (diff) | |
parent | 1861dc1fae549a0ee2b6287d4f7dc7f8797f5070 (diff) | |
download | volse-hubzilla-5ec4a4e6deb5d28cbfab54093f8b4180912738d4.tar.gz volse-hubzilla-5ec4a4e6deb5d28cbfab54093f8b4180912738d4.tar.bz2 volse-hubzilla-5ec4a4e6deb5d28cbfab54093f8b4180912738d4.zip |
Merge remote-tracking branch 'friendika/master' into newui
Diffstat (limited to 'update.php')
-rw-r--r-- | update.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/update.php b/update.php index adfb5fe02..ef036008f 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1081 ); +define( 'UPDATE_VERSION' , 1082 ); /** * @@ -673,4 +673,19 @@ function update_1079() { function update_1080() { q("ALTER TABLE `fcontact` ADD `updated` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'"); -}
\ No newline at end of file +} + +function update_1081() { + q("ALTER TABLE `photo` ADD `guid` CHAR( 64 ) NOT NULL AFTER `contact`id`, + ADD INDEX ( `guid` ) "); + $r = q("SELECT distinct(`resource-id`) FROM `photo` WHERE 1 group by `id`"); + if(count($r)) { + foreach($r as $rr) { + $guid = get_guid(); + q("update `photo` set `guid` = '%s' where `resource-id` = '%s'", + dbesc($guid), + dbesc($rr['resource-id']) + ); + } + } +} |