[PR #2872] [MERGED] db: add defensive removal of old indices #2906

Closed
opened 2025-12-29 04:19:36 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2872
Author: @kradalby
Created: 11/10/2025
Status: Merged
Merged: 11/10/2025
Merged by: @kradalby

Base: mainHead: kradalby/more-drops


📝 Commits (1)

  • 4930c45 db: add defensive removal of old indicies

📊 Changes

2 files changed (+36 additions, -3 deletions)

View changed files

📝 hscontrol/db/db.go (+28 -0)
📝 hscontrol/db/testdata/sqlite/headscale_0.26.1_dump_schema-to-0.27.0-old-table-cleanup.sql (+8 -3)

📄 Description

The should be cleaned by the db engine when the table is removed, but just in case. We have had too much assumptions in our DB world...

Closes #2867


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2872 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 11/10/2025 **Status:** ✅ Merged **Merged:** 11/10/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/more-drops` --- ### 📝 Commits (1) - [`4930c45`](https://github.com/juanfont/headscale/commit/4930c45cb7a51223ab4a59aff5ebdc1f4a2b0f7c) db: add defensive removal of old indicies ### 📊 Changes **2 files changed** (+36 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `hscontrol/db/db.go` (+28 -0) 📝 `hscontrol/db/testdata/sqlite/headscale_0.26.1_dump_schema-to-0.27.0-old-table-cleanup.sql` (+8 -3) </details> ### 📄 Description The should be cleaned by the db engine when the table is removed, but just in case. We have had too much assumptions in our DB world... Closes #2867 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:19:36 +01:00
adam closed this issue 2025-12-29 04:19:36 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2906