-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.0] [com_privacy] Fix default value for not nullable datetime columns #26461
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
Closed
richard67
wants to merge
12
commits into
joomla:4.0-dev
from
richard67:4.0-dev-datetime-default-com-privacy
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
be6f814
Privacy datetimes defaults - SQL changes
richard67 eca11bc
Merge remote-tracking branch 'upstream/4.0-dev' into 4.0-dev-datetime…
richard67 1e76ce3
Privacy datetimes defaults - PHP changes
richard67 eb5a78c
Revert "Privacy datetimes defaults - PHP changes"
richard67 6d39c82
Change confirm_token_created_at to not nullable
richard67 67a5139
Update old records
richard67 ab46044
Correct postgresql, silly me
richard67 cfbc030
Remove empty line in postgresql/4.0.0-2019-09-26.sql
richard67 4783de1
Merge branch '4.0-dev' into 4.0-dev-datetime-default-com-privacy
richard67 e8acb11
Merge branch '4.0-dev' into 4.0-dev-datetime-default-com-privacy
richard67 03d2768
Merge remote-tracking branch 'upstream/4.0-dev' into 4.0-dev-datetime…
richard67 18763ad
Merge branch '4.0-dev' into 4.0-dev-datetime-default-com-privacy
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
6 changes: 6 additions & 0 deletions
6
administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-26.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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ALTER TABLE `#__privacy_requests` MODIFY `requested_at` datetime NOT NULL; | ||
| ALTER TABLE `#__privacy_requests` MODIFY `confirm_token_created_at` datetime NOT NULL; | ||
|
|
||
| ALTER TABLE `#__privacy_consents` MODIFY `created` datetime NOT NULL; | ||
|
|
||
| UPDATE `#__privacy_requests` SET `confirm_token_created_at` = `requested_at` WHERE `confirm_token_created_at` = '0000-00-00 00:00:00'; |
6 changes: 6 additions & 0 deletions
6
administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-26.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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ALTER TABLE "#__privacy_requests" ALTER COLUMN "requested_at" DROP DEFAULT; | ||
| ALTER TABLE "#__privacy_requests" ALTER COLUMN "confirm_token_created_at" DROP DEFAULT; | ||
|
|
||
| ALTER TABLE "#__privacy_consents" ALTER COLUMN "created" DROP DEFAULT; | ||
|
|
||
| UPDATE "#__privacy_requests" SET "confirm_token_created_at" = "requested_at" WHERE "confirm_token_created_at" = '1970-01-01 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
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.
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.
What is this in real life? doesn't this need to be nullable until the confirm token is actually created?
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. To be honest, I don’t remember right now why I‘ve done it that way. Will check later today or tomorrow and if necessary correct that. Any hint where in code this token is created would be very welcome.
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.
Found where the token is set. Will check later what to do here at this place.