mirror of
https://github.com/juanfont/headscale.git
synced 2025-03-13 00:40:54 +00:00
Drop routes table
This commit is contained in:
parent
87326f5c4f
commit
e52f1e87ce
@ -635,11 +635,6 @@ AND auth_key_id NOT IN (
|
|||||||
return fmt.Errorf("adding column types.Node: %w", err)
|
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{}
|
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
|
return nil
|
||||||
},
|
},
|
||||||
Rollback: func(db *gorm.DB) error { return nil },
|
Rollback: func(db *gorm.DB) error { return nil },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user