We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46b8226 commit 341a3d3Copy full SHA for 341a3d3
CHANGELOG.md
@@ -7,6 +7,8 @@
7
8
- Fix issue where email and username being equal fails to match in Policy
9
[#2388](https://github.com/juanfont/headscale/pull/2388)
10
+- Delete invalid routes before adding a NOT NULL constraint on node_id
11
+ [#2386](https://github.com/juanfont/headscale/pull/2386)
12
13
## 0.24.1 (2025-01-23)
14
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