1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-08-14 13:51:01 +02:00

Drop routes table

This commit is contained in:
Florian Preinstorfer 2025-03-02 10:22:47 +01:00
parent 7891378f57
commit 774bc6febe

View File

@ -634,11 +634,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{}
@ -666,6 +661,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 },