mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-15 00:27:29 -06:00
[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:
parent
86a59db711
commit
6533531cf1
4 changed files with 22 additions and 5 deletions
|
|
@ -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").
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue