diff --git a/internal/db/bundb/migrations/20241113151042_remove_mention_updated_at.go b/internal/db/bundb/migrations/20241113151042_remove_mention_updated_at.go index bd72dc109..ba6e0bd3a 100644 --- a/internal/db/bundb/migrations/20241113151042_remove_mention_updated_at.go +++ b/internal/db/bundb/migrations/20241113151042_remove_mention_updated_at.go @@ -21,6 +21,7 @@ "context" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" + "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/uptrace/bun" ) @@ -37,6 +38,7 @@ func init() { } // Remove 'updated_at' column. + log.Info(ctx, "removing unused updated_at column from mentions to save space, please wait...") _, err = tx.NewDropColumn(). Model((*gtsmodel.Mention)(nil)). Column("updated_at"). diff --git a/internal/db/bundb/migrations/20241113152126_add_status_edits.go b/internal/db/bundb/migrations/20241113152126_add_status_edits.go index aa0b0d4b9..5d4fb7b3e 100644 --- a/internal/db/bundb/migrations/20241113152126_add_status_edits.go +++ b/internal/db/bundb/migrations/20241113152126_add_status_edits.go @@ -22,6 +22,7 @@ "reflect" gtsmodel "github.com/superseriousbusiness/gotosocial/internal/db/bundb/migrations/20241113152126_add_status_edits" + "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/uptrace/bun" ) @@ -38,6 +39,7 @@ func init() { } // Add EditIDs column to Status table. + log.Info(ctx, "adding edits column to statuses table...") _, err = tx.NewAddColumn(). Model((*gtsmodel.Status)(nil)). ColumnExpr(colDef). diff --git a/internal/db/bundb/migrations/20241121121623_enum_strings_to_ints.go b/internal/db/bundb/migrations/20241121121623_enum_strings_to_ints.go index 7621ddc6c..6767c6809 100644 --- a/internal/db/bundb/migrations/20241121121623_enum_strings_to_ints.go +++ b/internal/db/bundb/migrations/20241121121623_enum_strings_to_ints.go @@ -22,6 +22,7 @@ old_gtsmodel "github.com/superseriousbusiness/gotosocial/internal/db/bundb/migrations/20241121121623_enum_strings_to_ints" new_gtsmodel "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" + "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/superseriousbusiness/gotosocial/internal/util" "github.com/uptrace/bun" @@ -68,7 +69,9 @@ func init() { // Before making changes to the visibility col // we must drop all indices that rely on it. + log.Info(ctx, "dropping old visibility indexes...") for _, index := range visIndices { + log.Info(ctx, "dropping old index %s...", index.name) if _, err := tx.NewDropIndex(). Index(index.name). Exec(ctx); err != nil { @@ -88,7 +91,9 @@ func init() { } // Recreate the visibility indices. + log.Info(ctx, "creating new visibility indexes...") for _, index := range visIndices { + log.Info(ctx, "creating new index %s...", index.name) q := tx.NewCreateIndex(). Table("statuses"). Index(index.name). diff --git a/internal/db/bundb/migrations/20241203124608_remove_media_attachment_updated_at.go b/internal/db/bundb/migrations/20241203124608_remove_media_attachment_updated_at.go index 344168b38..63e5d5f90 100644 --- a/internal/db/bundb/migrations/20241203124608_remove_media_attachment_updated_at.go +++ b/internal/db/bundb/migrations/20241203124608_remove_media_attachment_updated_at.go @@ -21,6 +21,7 @@ "context" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" + "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/uptrace/bun" ) @@ -37,6 +38,7 @@ func init() { } // Remove 'updated_at' column. + log.Info(ctx, "removing unused updated_at column from media attachments to save space, please wait...") _, err = tx.NewDropColumn(). Model((*gtsmodel.MediaAttachment)(nil)). Column("updated_at").