File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 13
13
14
14
- Fix issue where email and username being equal fails to match in Policy
15
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 )
16
18
17
19
## 0.24.1 (2025-01-23)
18
20
Original file line number Diff line number Diff line change @@ -565,6 +565,14 @@ COMMIT;
565
565
}
566
566
}
567
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
+
568
576
err := tx .AutoMigrate (& types.Route {})
569
577
if err != nil {
570
578
return err
You can’t perform that action at this time.
0 commit comments