Piwigo/install/db/166-database.php
plegall b787dfd291 issue #1953 improved privacy on searches and associate each search to its creator
* remove temporary functions ws_gallery_getSearch and ws_gallery_updateSearch
* split get_search_array into sub-functions to use them in web API
* use search_uuid as search_id instead of the numeric search.id : better privacy
* only the creator of the search can update it
* if a visitors tries to open the search of another user, it (the search) gets forked into a new search
2023-08-09 19:18:30 +02:00

26 lines
930 B
PHP

<?php
// +-----------------------------------------------------------------------+
// | This file is part of Piwigo. |
// | |
// | For copyright and license information, please view the COPYING.txt |
// | file that was distributed with this source code. |
// +-----------------------------------------------------------------------+
if (!defined('PHPWG_ROOT_PATH'))
{
die('Hacking attempt!');
}
$upgrade_description = 'Create new columns for search (search_uuid, created_on, user_idx, forked_from).';
pwg_query('
ALTER TABLE `'.PREFIX_TABLE.'search`
ADD COLUMN `search_uuid` CHAR(23) DEFAULT NULL,
ADD COLUMN `created_on` DATETIME DEFAULT NULL,
ADD COLUMN `created_by` MEDIUMINT(8) UNSIGNED,
ADD COLUMN `forked_from` INT(10) UNSIGNED
;');
echo "\n".$upgrade_description."\n";
?>