-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration failed #2376
Comments
Can you check with your backup if you have any routes that does not have a Node? |
I don't have sorry, just downgraded to 0.24.0 its working fine but latest version not. :( |
Can you paste the output of the following query with your current database: select * from routes where node_id not in (select id from nodes); |
hi, no output at all |
It seems like there is at least one route without a referenced node. Can you please verify with: select id from routes where node_id is null; |
15 |
I am going to hop in here as well, let me know if you want a separate issue for my migration issue. Upgraded 0.24.0 -> 0.24.1 and have this issue when starting now:
Going to look into it in a few hours when I get home, but figured I would drop it here as well. Thanks! Edit (nblock): this is issue #2373 |
I have figured out my issue. Some of my nodes had a SQL that I used to fix: |
OK, you can fix this by deleting those rows: You may want to have a look at the routes just in case you want to re-add them later. Be sure to have a backup of the database. |
The routes table has a NOT NULL constraint on node_id. Fixes: juanfont#2376
fixed thank you |
The routes table has a NOT NULL constraint on node_id. Fixes: juanfont#2376
The routes table has a NOT NULL constraint on node_id. Fixes: #2376
The routes table has a NOT NULL constraint on node_id. Fixes: #2376
The routes table has a NOT NULL constraint on node_id. Fixes: juanfont#2376
Is this a support request?
Is there an existing issue for this?
Current Behavior
2025-01-24T20:51:26Z INF Opening database database=sqlite3 path=/var/lib/headscale/db.sqlite
2025-01-24T20:51:26Z FTL Migration failed: constraint failed: NOT NULL constraint failed: routes__temp.node_id (1299) error="constraint failed: NOT NULL constraint failed: routes__temp.node_id (1299)"
Expected Behavior
working as before
Steps To Reproduce
just updated to new version
Environment
Runtime environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: