From 27abf0e2c892ff0b2f846e5cfc2e657afc40ac08 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Tue, 2 Jan 2024 17:12:27 +0100 Subject: [PATCH] tested different order --- server/backend/migration/20240102000000.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/backend/migration/20240102000000.go b/server/backend/migration/20240102000000.go index 70b82a27..7584b19f 100644 --- a/server/backend/migration/20240102000000.go +++ b/server/backend/migration/20240102000000.go @@ -24,6 +24,13 @@ func migrate20240102000000() *gormigrate.Migration { if err := tx.Exec("DROP table card_comment").Error; err != nil { return err } + // tags + if err := tx.Exec("DROP table card2tag").Error; err != nil { + return err + } + if err := tx.Exec("DROP table tag").Error; err != nil { + return err + } //cards if err := tx.Exec("DROP table card_option").Error; err != nil { return err @@ -38,13 +45,6 @@ func migrate20240102000000() *gormigrate.Migration { if err := tx.Exec("DROP table card_type").Error; err != nil { return err } - // tags - if err := tx.Exec("DROP table tag").Error; err != nil { - return err - } - if err := tx.Exec("DROP table card2tag").Error; err != nil { - return err - } return nil }, Rollback: func(tx *gorm.DB) error {