fixes #2016 remove search.last_seen, never really used

This commit is contained in:
plegall
2023-10-02 14:55:33 +02:00
parent b5c9ca4819
commit 426c20d46b
3 changed files with 21 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
<?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 = 'Delete old column search.last_seen, never really used.';
pwg_query('UPDATE `'.PREFIX_TABLE.'search` SET `created_on` = `last_seen` where `created_on` IS NULL AND `last_seen` IS NOT NULL;');
pwg_query('ALTER TABLE `'.PREFIX_TABLE.'search` DROP COLUMN `last_seen`;');
echo "\n".$upgrade_description."\n";
?>

View File

@@ -324,7 +324,6 @@ CREATE TABLE `piwigo_search` (
`created_on` DATETIME DEFAULT NULL,
`created_by` MEDIUMINT(8) UNSIGNED,
`forked_from` INT(10) UNSIGNED,
`last_seen` date default NULL,
`rules` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;