diff options
Diffstat (limited to 'internal/db')
3 files changed, 18 insertions, 0 deletions
diff --git a/internal/db/bundb/migrations/20240613091853_drop_unused_media_columns.go b/internal/db/bundb/migrations/20240613091853_drop_unused_media_columns.go index 7c0cea99e..e13845fd2 100644 --- a/internal/db/bundb/migrations/20240613091853_drop_unused_media_columns.go +++ b/internal/db/bundb/migrations/20240613091853_drop_unused_media_columns.go @@ -20,11 +20,17 @@ package migrations import ( "context" + "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/uptrace/bun" ) func init() { up := func(ctx context.Context, db *bun.DB) error { + log.Info( + ctx, + "dropping unused media attachments columns, please wait; "+ + "this may take a long time if your database has lots of media attachments, don't interrupt it!", + ) return db.RunInTx(ctx, nil, func(ctx context.Context, tx bun.Tx) error { for _, dropcase := range []struct { diff --git a/internal/db/bundb/migrations/20240715204203_media_pipeline_improvements.go b/internal/db/bundb/migrations/20240715204203_media_pipeline_improvements.go index 5f01f53ef..9bf948bed 100644 --- a/internal/db/bundb/migrations/20240715204203_media_pipeline_improvements.go +++ b/internal/db/bundb/migrations/20240715204203_media_pipeline_improvements.go @@ -22,12 +22,18 @@ import ( old_gtsmodel "github.com/superseriousbusiness/gotosocial/internal/db/bundb/migrations/20240715204203_media_pipeline_improvements" new_gtsmodel "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" + "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/uptrace/bun" ) func init() { up := func(ctx context.Context, db *bun.DB) error { + log.Info( + ctx, + "doing media pipeline improvements; "+ + "this may take a while if your database has lots of media attachments, don't interrupt it!", + ) if err := db.RunInTx(ctx, nil, func(ctx context.Context, tx bun.Tx) error { if _, err := tx.NewAddColumn(). Table("media_attachments"). diff --git a/internal/db/bundb/migrations/20240722222556_remove_boost_content.go b/internal/db/bundb/migrations/20240722222556_remove_boost_content.go index e9226478b..a7764e2f7 100644 --- a/internal/db/bundb/migrations/20240722222556_remove_boost_content.go +++ b/internal/db/bundb/migrations/20240722222556_remove_boost_content.go @@ -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)). |