mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 03:09:58 +03:00
fixes #942 IPv6 compatibility, increase length of history.IP
This commit is contained in:
parent
960e8479cb
commit
14678d28a9
2 changed files with 21 additions and 1 deletions
20
install/db/173-database.php
Normal file
20
install/db/173-database.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?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 = 'increase history.IP length from VARCHAR(16) to CHAR(39), IPv6 compatible';
|
||||||
|
|
||||||
|
$query = 'ALTER TABLE `'.PREFIX_TABLE.'history` CHANGE `IP` `IP` char(39) NOT NULL default \'\';';
|
||||||
|
pwg_query($query);
|
||||||
|
|
||||||
|
echo "\n".$upgrade_description."\n";
|
||||||
|
?>
|
|
@ -143,7 +143,7 @@ CREATE TABLE `piwigo_history` (
|
||||||
`date` date NOT NULL default '1970-01-01',
|
`date` date NOT NULL default '1970-01-01',
|
||||||
`time` time NOT NULL default '00:00:00',
|
`time` time NOT NULL default '00:00:00',
|
||||||
`user_id` mediumint(8) unsigned NOT NULL default '0',
|
`user_id` mediumint(8) unsigned NOT NULL default '0',
|
||||||
`IP` varchar(15) NOT NULL default '',
|
`IP` char(39) NOT NULL default '',
|
||||||
`section` enum('categories','tags','search','list','favorites','most_visited','best_rated','recent_pics','recent_cats') default NULL,
|
`section` enum('categories','tags','search','list','favorites','most_visited','best_rated','recent_pics','recent_cats') default NULL,
|
||||||
`category_id` smallint(5) default NULL,
|
`category_id` smallint(5) default NULL,
|
||||||
`search_id` int(10) unsigned default NULL,
|
`search_id` int(10) unsigned default NULL,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue