From e52f1e87ce05e3502d17245b155a586b4aa2c365 Mon Sep 17 00:00:00 2001 From: Florian Preinstorfer Date: Sun, 2 Mar 2025 10:22:47 +0100 Subject: [PATCH] Drop routes table --- hscontrol/db/db.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hscontrol/db/db.go b/hscontrol/db/db.go index 7d0c3144..72fbf2c1 100644 --- a/hscontrol/db/db.go +++ b/hscontrol/db/db.go @@ -635,11 +635,6 @@ AND auth_key_id NOT IN ( return fmt.Errorf("adding column types.Node: %w", err) } } - // Ensure the ApprovedRoutes exist. - // err := tx.AutoMigrate(&types.Node{}) - // if err != nil { - // return fmt.Errorf("automigrating types.Node: %w", err) - // } nodeRoutes := map[uint64][]netip.Prefix{} @@ -667,6 +662,9 @@ AND auth_key_id NOT IN ( } } + // Drop the old table. + _ = tx.Migrator().DropTable(&types.Route{}) + return nil }, Rollback: func(db *gorm.DB) error { return nil },