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
[4.0] Changing checked_out_time from nulldate to real null value #25715
Conversation
administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-07-27.sql
Outdated
Show resolved
Hide resolved
Change alter table statements to 1 with MODIFY, correct column name for ucm_content table in UPDATE statement.
Corrections for MySQL schema update
SQL code style: `null` -> `NULL`
Fix SQL code style null to NULL, correct column name for ucm_content table also for postgresql
Correct MySQL schema update syntax errors
We're going to need to add this https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Table/Table.php#L125-L131 to affected tables I believe too |
@wilsonge Would that mean it is for the complete table? In this case it might really need to extend this PR to other columns or make new ones by table for where it's not done yet. @Hackwar I've successfully tested new install of 4.0-dev + this PR + changes from my PR #25658 with MySQL 8 and also with PostgreSQL. For testing updates I have a modified update package of last nightly build with changes from PR and my PR #25658, but this I haven't tested yet. To you both: How shall we continue? |
I'm very much for doing this in separate PRs. As I said, I'd like to tackle this as one generic feature per PR. Maybe the published_up/published_down stuff next? When we have all datetime fields processed, we can change that attribute, as you wrote @wilsonge. |
For testing update, modified update package of last nightly build + this PR + changes from my PR #25658 can be found here: https://test5.richard-fath.de/Joomla_4.0.0-alpha11-dev-Development-Update_Package__pr-25715.zip. Will test later. |
Updating a feature like checkin over the complete code base is hard to test and then you have tido the same tests for publishedup/down and so on. |
But in that case I think we'll find the null fields do not get updated and in that case i don't think you'll be able to uncheckout an article. This is why things were being done per component rather than per db field :) |
Replaced by #26491 and #26490. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25715. |
Since MySQL 8 does not support the 0000-00-00 00:00:00 default value anymore, we have to fix this properly and use a real null value instead. I was looking for some way to cut up the work in good chunks and for me it was along the lines of features. So the checkin feature is the first that I've tackled here. This should change all columns and the code to properly use the null value instead. The Postgres update code is untested as of yet.