We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ba6ad3 commit f44b1d3Copy full SHA for f44b1d3
CHANGELOG.md
@@ -13,6 +13,8 @@
13
14
- Fix issue where email and username being equal fails to match in Policy
15
[#2388](https://github.com/juanfont/headscale/pull/2388)
16
+- Delete invalid routes before adding a NOT NULL constraint on node_id
17
+ [#2386](https://github.com/juanfont/headscale/pull/2386)
18
19
## 0.24.1 (2025-01-23)
20
hscontrol/db/db.go
@@ -565,6 +565,14 @@ COMMIT;
565
}
566
567
568
+ // Remove any invalid routes without a node_id.
569
+ if tx.Migrator().HasTable(&types.Route{}) {
570
+ err := tx.Exec("delete from routes where node_id is null").Error
571
+ if err != nil {
572
+ return err
573
+ }
574
575
+
576
err := tx.AutoMigrate(&types.Route{})
577
if err != nil {
578
return err
0 commit comments