Fix new-account creation failing under MariaDB strict mode

accounts.lastlogin/logtime had no defaults and were NOT NULL, but the
auto-create-account INSERT never set them, so new accounts failed
under MariaDB strict mode (silently accepted under the old MySQL
5.0 target). Insert explicit empty/zero values and give lastlogin a
default; also widen it to varchar(32) to match the runtime.sql fix
already applied to the starttime column.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
ThomasandClaude Sonnet 5 committed 2026-07-09 06:35:31 +02:00
1 parent 5f600d0e61
commit 582e29106b
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ CREATE TABLE IF NOT EXISTS `accounts` (
`isSiteLogged` tinyint(1) default '0',
`ktpoints` int(11) NOT NULL default '0',
`newpoints` int(11) NOT NULL default '0',
`lastlogin` varchar(20) NOT NULL,
`lastlogin` varchar(32) NOT NULL default '',
`logtime` int(11) NOT NULL,
`totlogtime` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)