Compare commits

...

2 Commits

Author SHA1 Message Date
Lorenzo Yario
09e915d0e5
oops. grammar. 2024-05-16 22:40:50 -07:00
Lorenzo Yario
9b2bea1779
5.2.0 board schema changes 2024-05-16 22:28:25 -07:00

View File

@ -635,6 +635,19 @@ if (file_exists($config['has_installed'])) {
`created_at` int(11), `created_at` int(11),
PRIMARY KEY (`cookie`,`extra`) PRIMARY KEY (`cookie`,`extra`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;') or error(db_error()); ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;') or error(db_error());
case '5.1.4':
//This was done in earlier versions, but certain failed checks caused many to still use utf8mb3 and MyISAM.
foreach ($boards as &$board) {
query(sprintf("ALTER TABLE ``posts_%s`` ENGINE=InnoDB, CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci", $board['uri'])) or error(db_error());
}
$tables = [
'antispam', 'bans', 'ban_appeals', 'boards', 'captchas', 'flood', 'ip_notes', 'modlogs', 'mods', 'mutes', 'news', 'nntp_references', 'noticeboard', 'pages', 'pms', 'reports', 'search_queries', 'theme_settings'
];
foreach ($tables as $table) {
query(sprintf("ALTER TABLE ``%s`` ENGINE=InnoDB, CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci", $table)) or error(db_error());
}
//Let's not drop the telegrams table in case board admins still need them for something.
case false: case false:
// TODO: enhance Tinyboard -> vichan upgrade path. // TODO: enhance Tinyboard -> vichan upgrade path.
query("CREATE TABLE IF NOT EXISTS ``search_queries`` ( `ip` varchar(39) NOT NULL, `time` int(11) NOT NULL, `query` text NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;") or error(db_error()); query("CREATE TABLE IF NOT EXISTS ``search_queries`` ( `ip` varchar(39) NOT NULL, `time` int(11) NOT NULL, `query` text NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;") or error(db_error());
@ -873,7 +886,7 @@ if ($step == 0) {
), ),
array( array(
'category' => 'Misc', 'category' => 'Misc',
'name' => 'HTTPS not being used', 'name' => 'HTTPS being used',
'result' => $httpsvalue = true, 'result' => $httpsvalue = true,
'required' => false, 'required' => false,
'message' => 'You are not currently using https for vichan, or at least for your backend server. If this intentional, add "$config[\'cookies\'][\'secure_login_only\'] = 0;" (or 1 if using a proxy) on a new line under "Additional configuration" on the next page.' 'message' => 'You are not currently using https for vichan, or at least for your backend server. If this intentional, add "$config[\'cookies\'][\'secure_login_only\'] = 0;" (or 1 if using a proxy) on a new line under "Additional configuration" on the next page.'