diff options
| author | 2025-05-12 16:22:45 +0000 | |
|---|---|---|
| committer | 2025-05-12 16:22:45 +0000 | |
| commit | 3fedff3a5aa7602069290c216ced5f63acd21357 (patch) | |
| tree | 36ed10b78b4077bc3caec58d9642fb817868b1dd /internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go | |
| parent | [chore] Use Codeberg API for get_latest_snapshot (#4151) (diff) | |
| download | gotosocial-3fedff3a5aa7602069290c216ced5f63acd21357.tar.xz | |
[chore] Tidy up previous interaction policy migrations (#4171)
This pull request tidies up some previous migrations by making sure there's a proper snapshot in the migrations folder of what interaction policies looked like at the time the migration was written, rather than using the moving target `internal/gtsmodel`.
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4171
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go')
| -rw-r--r-- | internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go b/internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go index 391322f3e..79d0b01bf 100644 --- a/internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go +++ b/internal/db/bundb/migrations/20240809134448_interaction_requests_client_api.go @@ -20,8 +20,7 @@ package migrations import ( "context" - "code.superseriousbusiness.org/gotosocial/internal/gtsmodel" - "code.superseriousbusiness.org/gotosocial/internal/typeutils" + gtsmodel "code.superseriousbusiness.org/gotosocial/internal/db/bundb/migrations/20240809134448_interaction_requests_client_api" "github.com/uptrace/bun" ) @@ -93,7 +92,7 @@ func init() { // For each currently pending status, check whether it's a reply or // a boost, and insert a corresponding interaction request into the db. for _, pendingStatus := range pendingStatuses { - req := typeutils.StatusToInteractionRequest(pendingStatus) + req := gtsmodel.StatusToInteractionReq(pendingStatus) if _, err := tx. NewInsert(). Model(req). @@ -121,7 +120,7 @@ func init() { } for _, pendingFave := range pendingFaves { - req := typeutils.StatusFaveToInteractionRequest(pendingFave) + req := gtsmodel.StatusFaveToInteractionRequest(pendingFave) if _, err := tx. NewInsert(). |
