headscale/hscontrol/db/testdata/sqlite
Shourya Gautam 4e1834adaf
db: use PolicyManager for RequestTags migration
Refactor the RequestTags migration (202601121700-migrate-hostinfo-request-tags)
to use PolicyManager.NodeCanHaveTag() instead of reimplementing tag validation.

Changes:
- NewHeadscaleDatabase now accepts *types.Config to allow migrations
  access to policy configuration
- Add loadPolicyBytes helper to load policy from file or DB based on config
- Add standalone GetPolicy(tx *gorm.DB) for use during migrations
- Replace custom tag validation logic with PolicyManager

Benefits:
- Full HuJSON parsing support (not just JSON)
- Proper group expansion via PolicyManager
- Support for nested tags and autogroups
- Works with both file and database policy modes
- Single source of truth for tag validation


Co-Authored-By: Shourya Gautam <shouryamgautam@gmail.com>
2026-01-21 15:10:29 +01:00
..
failing-node-preauth-constraint_dump.sql db: add sqlite "source of truth" schema 2025-07-07 15:48:38 +01:00
headscale_0.26.0-beta.1_dump.sql db: add sqlite "source of truth" schema 2025-07-07 15:48:38 +01:00
headscale_0.26.0-beta.2_dump.sql db: add sqlite "source of truth" schema 2025-07-07 15:48:38 +01:00
headscale_0.26.0_dump.sql db: add sqlite "source of truth" schema 2025-07-07 15:48:38 +01:00
headscale_0.26.1_dump-litestream.sql db: remove _schema from migration tests 2025-11-13 09:46:40 -06:00
headscale_0.26.1_dump.sql db: add sqlite "source of truth" schema 2025-07-07 15:48:38 +01:00
headscale_0.26.1_dump_schema-to-0.27.0-old-table-cleanup.sql db: add defensive removal of old indicies 2025-11-10 20:07:29 +01:00
request_tags_migration_test.sql db: use PolicyManager for RequestTags migration 2026-01-21 15:10:29 +01:00