mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
31 lines
972 B
PHP
31 lines
972 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. |
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
|
|
|
|
$upgrade_description = 'add lastmodified field for categories, images, groups, users, tags';
|
|
|
|
$tables = array(
|
|
CATEGORIES_TABLE,
|
|
GROUPS_TABLE,
|
|
IMAGES_TABLE,
|
|
TAGS_TABLE,
|
|
USER_INFOS_TABLE
|
|
);
|
|
|
|
foreach ($tables as $table)
|
|
{
|
|
pwg_query('
|
|
ALTER TABLE '. $table .'
|
|
ADD `lastmodified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
ADD INDEX `lastmodified` (`lastmodified`)
|
|
;');
|
|
}
|
|
|
|
echo "\n".$upgrade_description."\n";
|