issue #2355 update piwigo structure sql

and fix api key bug after first install
This commit is contained in:
Linty
2025-07-22 18:26:01 +02:00
parent 4f6da8ea6a
commit 5f0dc8548f
2 changed files with 6 additions and 0 deletions

View File

@@ -483,6 +483,7 @@ else
// cache requires $logger which is not instanciated // cache requires $logger which is not instanciated
$user = build_user(1, false); $user = build_user(1, false);
log_user($user['id'], false); log_user($user['id'], false);
$_SESSION['connected_with'] = 'pwg_ui';
$user['preferences']['show_whats_new_'.get_branch_from_version(PHPWG_VERSION)] = false; $user['preferences']['show_whats_new_'.get_branch_from_version(PHPWG_VERSION)] = false;

View File

@@ -410,10 +410,15 @@ DROP TABLE IF EXISTS `piwigo_user_auth_keys`;
CREATE TABLE `piwigo_user_auth_keys` ( CREATE TABLE `piwigo_user_auth_keys` (
`auth_key_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `auth_key_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`auth_key` varchar(255) NOT NULL, `auth_key` varchar(255) NOT NULL,
`apikey_secret` VARCHAR(255) DEFAULT NULL,
`user_id` mediumint(8) unsigned NOT NULL, `user_id` mediumint(8) unsigned NOT NULL,
`created_on` datetime NOT NULL, `created_on` datetime NOT NULL,
`duration` int(11) unsigned DEFAULT NULL, `duration` int(11) unsigned DEFAULT NULL,
`expired_on` datetime NOT NULL, `expired_on` datetime NOT NULL,
`apikey_name` VARCHAR(100) DEFAULT NULL,
`key_type` VARCHAR(40) DEFAULT NULL,
`revoked_on` datetime DEFAULT NULL,
`last_used_on` datetime DEFAULT NULL,
PRIMARY KEY (`auth_key_id`) PRIMARY KEY (`auth_key_id`)
) ENGINE=MyISAM; ) ENGINE=MyISAM;