From 91fa9c62076df6bdefb2fde0469ba5bde51cebd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wysoki=C5=84ski?= Date: Sun, 13 Nov 2022 14:03:23 +0100 Subject: [PATCH] fix: add missing drop column to migration --- .../20221112070547_tribes_players_add_columns.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/bundb/migrations/20221112070547_tribes_players_add_columns.go b/internal/bundb/migrations/20221112070547_tribes_players_add_columns.go index 5df0185..9d1625b 100644 --- a/internal/bundb/migrations/20221112070547_tribes_players_add_columns.go +++ b/internal/bundb/migrations/20221112070547_tribes_players_add_columns.go @@ -146,12 +146,19 @@ func init() { Model(m). Column(col). Exec(ctx); err != nil { - return fmt.Errorf("couldn't drop the %s column: %w", col, err) + return fmt.Errorf("%T - couldn't drop the %s column: %w", m, col, err) } } } } + if _, err := tx.NewDropColumn(). + Model(&model.Player{}). + Column("last_activity_at"). + Exec(ctx); err != nil { + return fmt.Errorf("player - couldn't add the last_activity_at column: %w", err) + } + return nil }) })