-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Joomla 4.x Maintenance: Database showing an inconsistent problem. #40765
Comments
@ahamed |
|
@alikon It works using |
the issue reports |
Well on MySQL and MariaDB it needs to be a function |
I fully agree with you @richard67 ` |
@richard67 I believe the constant But the problem is in the Joomla Database fixer. It reports CURRENT_TIMESTAMP as invalid unless you put it inside a single quote. |
@ahamed I have already explained that the database fixer does not support that. I know the code of the fixer in all details. If you put it in single quotes it is a constant string and so will make the database fixer happy but not do what you want because it's a string literal. As far as I can see, expressions for default values were not supported in MySQL 5.7 (and so also in 5.6). In the MySQL 8.0 documentation https://dev.mysql.com/doc/refman/8.0/en/create-table.html :
In the MySQL 5.7 documentation https://dev.mysql.com/doc/refman/5.7/en/create-table.html :
Joomla 4 still has to work with MySQL 5.6, and so should do any 3rd party extensions for Joomla 4. Therefore the CMS core doesn't use expressions like What it does for the
That means you have to explicitly specify the In Joomla 4 you have to live with that and do it like that. In Joomla 5 we can change that. Joomla 5 is planned to be released in October this year, so not so long to wait. |
supporting this in 4.4 would make maintaining 5.x and 4.x at the same time easier for extension developer. Motion for mysql minimum support version 8.0.13 is in progress. |
Thanks to all. I've found my answer. |
Steps to reproduce the issue
I've modified some of my table columns that are
DATETIME
fields. The SQL command is -But the Maintenance: Database reporting a problem
If I change the default value from
CURRENT_TIMESTAMP
to'CURRENT_TIMESTAMP'
Tha means put the
CURRENT_TIMESTAMP
inside a single quote the Database Maintenance problem is gone. But the default value'CURRENT_TIMESTAMP'
is not a valid default value.Expected result
Should not show a problem for
Actual result
Showing Database Maintenance problem.
System information (as much as possible)
Joomla! Version -> 4.3.2
PHP Version -> 8.0.8
Server -> mysq
Version -> 5.7.34
Collation -> utf8mb4_unicode_ci
Additional comments
The text was updated successfully, but these errors were encountered: