-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(setupchecks): add row format setup check for MySQL databases #48547
Conversation
|
||
public function run(): SetupResult { | ||
if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) { | ||
return SetupResult::success($this->l10n->t('You are not using MySQL')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it makes sense to introduce something like SetupResult::skipped
and then filter out the setup checks with severity = skipped by default? If you think so, I would log a feature request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
$sql = 'SELECT table_name | ||
FROM information_schema.tables | ||
WHERE table_schema = ? | ||
AND table_name LIKE "*PREFIX*%" | ||
AND row_format = "Compressed";'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you not run this with our query builder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question!
I didn't find it useful because it's only for MySQL like DBs and I am not sure I can query another database 🤔
Signed-off-by: Benjamin Gaussorgues <[email protected]>
1ea8e6a
to
f70f70e
Compare
|
||
return SetupResult::warning( | ||
$this->l10n->n( | ||
'Table %s is not using ROW_FORMAT=Dynamic. This format offers the best database performances for Nextcloud. Please change the row format to Dynamic.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plurals without %n
are confusing for translators.
I would say the last line of https://docs.nextcloud.com/server/latest/developer_manual/basics/front-end/l10n.html#correct-plurals is applicable here
Summary
Add a setup check to warn about tables using ROW_FORMAT=Compressed
MySQL specific
Checklist