[chore] Add some log lines to recent migrations warning not to interrupt (#3134)

* [chore] Add some log lines to recent migrations warning not to interrupt

* arse
This commit is contained in:
tobi 2024-07-23 23:06:20 +02:00 committed by GitHub
commit 6533531cf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 5 deletions

View file

@ -21,6 +21,7 @@ import (
"context"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/log"
"github.com/uptrace/bun"
)
@ -29,6 +30,11 @@ import (
// Admins may want to vacuum after running this migration.
func init() {
up := func(ctx context.Context, db *bun.DB) error {
log.Info(
ctx,
"dropping duplicated status boost data, please wait; "+
"this may take a long time if your database has lots of statuses, don't interrupt it!",
)
return db.RunInTx(ctx, nil, func(ctx context.Context, tx bun.Tx) error {
_, err := tx.NewUpdate().
Model((*gtsmodel.Status)(nil)).