-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
ContributionRecur modified_date should update to current_timestamp on update #21472
ContributionRecur modified_date should update to current_timestamp on update #21472
Conversation
(Standard links)
|
I think this is fine if the test is fixed & r-run testing passes api_v3_SyntaxConformanceTest::testCreateSingleValueAlter with data set #9 ('ContributionRecur') |
fc34c4d
to
6a53beb
Compare
@eileenmcnaughton The issue with the test is the API3 ContributionRecur.get - returnParams need to ignore |
6a53beb
to
b178252
Compare
@@ -1 +1,3 @@ | |||
{* file to handle db changes in 5.43.alpha1 during upgrade *} | |||
|
|||
ALTER TABLE civicrm_contribution_recur MODIFY COLUMN modified_date DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Last updated date for this record. mostly the last time a payment was received'; |
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.
@mattwire just wondering should this be timestamp not datetime? I note it currently is a datetime I think but for modified date should we change to timestamp here?
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.
It might be one of those ones where we made it datetime because of earlier mysql having limits around timestamp. I agreed with Timestamp being the right format
I just have one question around the column type but apart from that this is mergeable adding merge ready |
b178252
to
8afede6
Compare
@seamuslee001 @eileenmcnaughton I've updated to convert to timestamp. There are various other date fields which are datetime on |
@@ -144,7 +144,7 @@ | |||
<name>modified_date</name> | |||
<title>Modified Date</title> | |||
<type>datetime</type> |
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.
doesn't this need to change too ^^
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.
Yes.. fixed
8afede6
to
a18049c
Compare
In the case of 'created_date' I think it's a straight forward yes. For the other fields I feel like they ideally would be timestamps but I don't know if converting them has any implications - especially with regards to 'next scheduled date' |
This is conflicted now. |
a18049c
to
38b8dbf
Compare
@demeritcowboy resolved conflicts |
Overview
A
modified_date
field should update on update... All others do!Before
contribution_recur.modified_date
does not update automatically.After
contribution_recur.modified_date
does update automatically.Technical Details
Missing
ON UPDATE CURRENT_TIMESTAMP()
in definition.Comments