-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.0] [com_newsfeeds] Fix default value for not nullable datetime column #26380
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
Merged
wilsonge
merged 12 commits into
joomla:4.0-dev
from
richard67:4.0-dev-datetime-default-com-newsfeeds
Oct 7, 2019
Merged
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f852f6b
Newsfeeds not nullable datetimes defaults - SQL changes
richard67 8e3ad84
Don't check for pseudo null datetimes in PHP
richard67 5e8722d
SQL CS
richard67 d330493
Merge branch '4.0-dev' into 4.0-dev-datetime-default-com-newsfeeds
richard67 d710ef5
Merge branch '4.0-dev' into 4.0-dev-datetime-default-com-newsfeeds
richard67 1341283
Merge branch '4.0-dev' into 4.0-dev-datetime-default-com-newsfeeds
rdeutz 8f65e81
No defaults for not nullable, minimize updating old data, handle ucm …
richard67 eefe49a
Update modified also on postgresql
richard67 4dfc3f1
Merge branch '4.0-dev' into 4.0-dev-datetime-default-com-newsfeeds
richard67 9408e08
Merge branch '4.0-dev' into 4.0-dev-datetime-default-com-newsfeeds
richard67 2d61be4
Merge remote-tracking branch 'upstream/4.0-dev' into 4.0-dev-datetime…
richard67 07dd4a3
Update install.mysql.utf8.sql
richard67 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
21 changes: 20 additions & 1 deletion
21
administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-06-29.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,27 @@ | ||
| ALTER TABLE `#__newsfeeds` MODIFY `created` datetime NOT NULL; | ||
| ALTER TABLE `#__newsfeeds` MODIFY `modified` datetime NOT NULL; | ||
|
|
||
| ALTER TABLE `#__newsfeeds` MODIFY `publish_up` datetime NULL DEFAULT NULL; | ||
| ALTER TABLE `#__newsfeeds` MODIFY `publish_down` datetime NULL DEFAULT NULL; | ||
| ALTER TABLE `#__newsfeeds` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; | ||
|
|
||
| UPDATE `#__newsfeeds` SET `modified` = `created` WHERE `modified` = '0000-00-00 00:00:00'; | ||
|
|
||
| UPDATE `#__newsfeeds` SET | ||
| `publish_up` = CASE WHEN `publish_up` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_up` END, | ||
| `publish_down` = CASE WHEN `publish_down` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_down` END, | ||
| `checked_out_time` = CASE WHEN `checked_out_time` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `checked_out_time` END; | ||
| `checked_out_time` = CASE WHEN `checked_out_time` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `checked_out_time` END; | ||
|
|
||
| UPDATE `#__ucm_content` SET `core_modified_time` = `core_created_time` | ||
| WHERE `core_type_alias` = 'com_newsfeeds.newsfeed' | ||
| AND `core_modified_time` = '0000-00-00 00:00:00'; | ||
|
|
||
| UPDATE `#__ucm_content` SET `core_publish_up` = NULL | ||
| WHERE `core_type_alias` = 'com_newsfeeds.newsfeed' | ||
| AND `core_publish_up` = '0000-00-00 00:00:00'; | ||
| UPDATE `#__ucm_content` SET `core_publish_down` = NULL | ||
| WHERE `core_type_alias` = 'com_newsfeeds.newsfeed' | ||
| AND `core_publish_down` = '0000-00-00 00:00:00'; | ||
| UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL | ||
| WHERE `core_type_alias` = 'com_newsfeeds.newsfeed' | ||
| AND `core_checked_out_time` = '0000-00-00 00:00:00'; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.