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
Wrong Table Layout (timestamp instead of datetime with wrong default value) #11527
Conversation
this patch has been created at @icampus |
What about existing sites? |
ALTER TABLE should be added in a new file in 'administrator/components/com_admin/sql/updates/mysql' |
@wmchris Better use The CHANGE statement will work, too, but because you do not want to rename the column there is no need to it, and so with 1 column name to be specified in the statement there is 1 chance less for a typo. And it would fit to the existing update scripts, where we always used MODIFY if sufficient and CHANGE only if necessary. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11527. |
I have tested this item ✅ successfully on 94368ba This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11527. |
@alikon can you please test/review this? |
@jeckodevelopment added to my todo list |
it lacks the update |
Well, ok, iirc, @wmchris you should change the DB also in a "dedicated" SQL file specific for this release, in order to apply the patch also to updated websites and not just on fresh installations. syntax is: X.X.X-YYYY-MM-DD (where obviously X.X.X is the target version of this PR and YYYY-MM-DD represents the date of this PR). |
@wmchris is this PR now for testing? |
If this PR get no Response, it will be closed at 22th June 2017. |
@franz-wohlkoenig It seems that @wmchris has deleted the branch for this PR. But the PR makes sense: All columns "checked_out_time" in Joomla core tables on mysql are of type DATETIME, except the one where this PR wants to fix it. For postgresql and sqlazure (aka mssql) the types of these columns are consistent among all tables. So this PR still makes sense. @wmchris and @franz-wohlkoenig : The only 2 things which are not done yet in this PR here is the missing update scipt in 'administrator/components/com_admin/sql/updates/mysql', e.g. 3.7.3-2017-05-28.sql, and the use of "ALTER TABLE ... MODIFY" in that SQL script instead of "ALTER TABLE ... CHANGE", so it fits to the existing scripts, see my comment above. @wmchris If you want and let me know which branch in your repository this PR comes from, I can make a pull request against your branch with my recommended changes. Then you can accept them and this PR would be OK. It could be tested by review from my point of view. If you don' have time for continuing this PR, let me know and I will take it over as described below. @franz-wohlkoenig If no reaction from @wmchris , shall I takeover this PR, i.e. make a new one with these changes and you close this one in favour of the new one? I would then at least give some thanks to @wmchris in my PR's description. |
I have tested this item ✅ successfully on 94368ba This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11527. |
@franz-wohlkoenig If this PR here will be merged I will make an own, new one for adding the missing schema update script for mysql. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11527. |
I meanwhile have decided to redo this PR with a new one, see #16469 . |
RTC after two successful tests. |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/11527 |
closed in favor of PR #16469 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11527. |
Summary of Changes
default database creation sql file has a timestamp in table menu instead of the datetime, but has the datetime default value.
Testing Instructions
on fresh installation check if table _menu contains a field with the type "datetime" called checked_out_time