• PHP 7.1 (PHP 7.1.6-1~ubuntu16.04.1+deb.sury.org+1)
• Plugins: $config['plugins'] = array('attachment_reminder', 'emoticons', 'help', 'markasjunk', 'newmail_notifier', 'password', 'twofactor_gauthenticator');
Updates:
• Updated composer to 1.4.2
• Overwrite composer.json with composer.json-dist
• Ran composer update --no-dev
bin/update.sh still fails:
What version are you upgrading from? Type '?' if you don't know.
?
Executing database schema update.
Updating database schema (2015111100)... [FAILED]
NOTE: Update dependencies by running `php composer.phar update --no-dev`
Here's the SQL it's trying to run:
# more 2015111100.sql
ALTER TABLE `users`
ADD `failed_login` datetime DEFAULT NULL,
ADD `failed_login_counter` int(10) UNSIGNED DEFAULT NULL;
# more SQL/mysql/2016081200.sql
ALTER TABLE `session` DROP COLUMN `created`;
Running this manually:
mysql> ALTER TABLE `users`
-> ADD `failed_login` datetime DEFAULT NULL,
-> ADD `failed_login_counter` int(10) UNSIGNED DEFAULT NULL;
ERROR 1067 (42000): Invalid default value for 'created'
ALTER TABLE `session` DROP COLUMN `created`;
ERROR 1067 (42000): Invalid default value for 'changed'
Looking in mysql.initial.sql, I see the default values for created are
1000-01-01 00:00:00.
Aside: per
]https://stackoverflow.com/questions/36882149/error-1067-42000-invalid-default-value-for-created-at], this is due to
sql_mode having
NO_ZERO_IN_DATE,NO_ZERO_DATE.
Aha. Running this SQL manually:
•
alter table users modify created datetime NOT NULL default '1000-01-01 00:00:00';
alter table session modify changed datetime NOT NULL default '1000-01-01 00:00:00', modify created datetime NOT NULL default '1000-01-01 00:00:00';
Lets me run the script's SQL:
ALTER TABLE `users` ADD `failed_login` datetime DEFAULT NULL, ADD `failed_login_counter` int(10) UNSIGNED DEFAULT NULL;
ALTER TABLE `session` DROP COLUMN `created`;
ALTER TABLE `dictionary` ADD COLUMN `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST; -- redundant, for compat. with Galera Cluster
DROP TABLE `cache`;
DROP TABLE `cache_shared`;
CREATE TABLE `cache` (
`user_id` int(10) UNSIGNED NOT NULL,
`cache_key` varchar(128) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
`expires` datetime DEFAULT NULL,
`data` longtext NOT NULL,
PRIMARY KEY (`user_id`, `cache_key`),
CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
INDEX `expires_index` (`expires`)
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
CREATE TABLE `cache_shared` (
`cache_key` varchar(255) /*!40101 CHARACTER SET ascii COLLATE ascii_general_ci */ NOT NULL,
`expires` datetime DEFAULT NULL,
`data` longtext NOT NULL,
PRIMARY KEY (`cache_key`),
INDEX `expires_index` (`expires`)
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
update system set value='2016112200';
Then I was able to log in. (Aside: I had to reauth my 2FA. And log in twice. But I'm in.)