Drop routes table

This commit is contained in:
Florian Preinstorfer 2025-03-02 10:22:47 +01:00 committed by nblock
parent 87326f5c4f
commit e52f1e87ce

View File

@ -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 },