[chore] replace statuses.updated_at column with statuses.edited_at (#3636)

* update statuses table to replace updated_at column with edited_at

* code comment

* better code comments, fix setting of status + edit + mention + poll database times

* fix log to logf call

* fix status.EditIDs not being carried over in dereferencer.encrichStatus()

* move status.EditID setting into handleStatusEdit()
This commit is contained in:
kim 2025-01-08 10:29:23 +00:00 committed by GitHub
commit c013892ca2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 417 additions and 118 deletions

View file

@ -147,7 +147,6 @@ func (suite *StatusStatusHomeTimelineableTestSuite) TestThread() {
URL: "http://localhost:8080/@the_mighty_zork/statuses/01G395ESAYPK9161QSQEZKATJN",
Content: "nbnbdy expects dog",
CreatedAt: testrig.TimeMustParse("2021-09-20T12:41:37+02:00"),
UpdatedAt: testrig.TimeMustParse("2021-09-20T12:41:37+02:00"),
Local: util.Ptr(false),
AccountURI: "http://localhost:8080/users/the_mighty_zork",
AccountID: threadParentAccount.ID,
@ -197,7 +196,6 @@ func (suite *StatusStatusHomeTimelineableTestSuite) TestChainReplyFollowersOnly(
URL: "http://fossbros-anonymous.io/@foss_satan/statuses/01G3957TS7XE2CMDKFG3MZPWAF",
Content: "didn't expect dog",
CreatedAt: testrig.TimeMustParse("2021-09-20T12:40:37+02:00"),
UpdatedAt: testrig.TimeMustParse("2021-09-20T12:40:37+02:00"),
Local: util.Ptr(false),
AccountURI: "http://fossbros-anonymous.io/users/foss_satan",
AccountID: originalStatusParent.ID,
@ -228,7 +226,6 @@ func (suite *StatusStatusHomeTimelineableTestSuite) TestChainReplyFollowersOnly(
URL: "http://localhost:8080/@the_mighty_zork/statuses/01G395ESAYPK9161QSQEZKATJN",
Content: "nbnbdy expects dog",
CreatedAt: testrig.TimeMustParse("2021-09-20T12:41:37+02:00"),
UpdatedAt: testrig.TimeMustParse("2021-09-20T12:41:37+02:00"),
Local: util.Ptr(false),
AccountURI: "http://localhost:8080/users/the_mighty_zork",
AccountID: replyingAccount.ID,
@ -259,7 +256,6 @@ func (suite *StatusStatusHomeTimelineableTestSuite) TestChainReplyFollowersOnly(
URL: "http://localhost:8080/@the_mighty_zork/statuses/01G395NZQZGJYRBAES57KYZ7XP",
Content: "*nobody",
CreatedAt: testrig.TimeMustParse("2021-09-20T12:42:37+02:00"),
UpdatedAt: testrig.TimeMustParse("2021-09-20T12:42:37+02:00"),
Local: util.Ptr(false),
AccountURI: "http://localhost:8080/users/the_mighty_zork",
AccountID: replyingAccount.ID,
@ -301,7 +297,6 @@ func (suite *StatusStatusHomeTimelineableTestSuite) TestChainReplyPublicAndUnloc
URL: "http://fossbros-anonymous.io/@foss_satan/statuses/01G3957TS7XE2CMDKFG3MZPWAF",
Content: "didn't expect dog",
CreatedAt: testrig.TimeMustParse("2021-09-20T12:40:37+02:00"),
UpdatedAt: testrig.TimeMustParse("2021-09-20T12:40:37+02:00"),
Local: util.Ptr(false),
AccountURI: "http://fossbros-anonymous.io/users/foss_satan",
AccountID: originalStatusParent.ID,
@ -332,7 +327,6 @@ func (suite *StatusStatusHomeTimelineableTestSuite) TestChainReplyPublicAndUnloc
URL: "http://localhost:8080/@the_mighty_zork/statuses/01G395ESAYPK9161QSQEZKATJN",
Content: "nbnbdy expects dog",
CreatedAt: testrig.TimeMustParse("2021-09-20T12:41:37+02:00"),
UpdatedAt: testrig.TimeMustParse("2021-09-20T12:41:37+02:00"),
Local: util.Ptr(false),
AccountURI: "http://localhost:8080/users/the_mighty_zork",
AccountID: replyingAccount.ID,
@ -363,7 +357,6 @@ func (suite *StatusStatusHomeTimelineableTestSuite) TestChainReplyPublicAndUnloc
URL: "http://localhost:8080/@the_mighty_zork/statuses/01G395NZQZGJYRBAES57KYZ7XP",
Content: "*nobody",
CreatedAt: testrig.TimeMustParse("2021-09-20T12:42:37+02:00"),
UpdatedAt: testrig.TimeMustParse("2021-09-20T12:42:37+02:00"),
Local: util.Ptr(false),
AccountURI: "http://localhost:8080/users/the_mighty_zork",
AccountID: replyingAccount.ID,