make tags first class node owner (#2885)
This PR changes tags to be something that exists on nodes in addition to users, to being its own thing. It is part of moving our tags support towards the correct tailscale compatible implementation. There are probably rough edges in this PR, but the intention is to get it in, and then start fixing bugs from 0.28.0 milestone (long standing tags issue) to discover what works and what doesnt. Updates #2417 Closes #2619
This commit is contained in:
parent
705b239677
commit
eb788cd007
49 changed files with 3102 additions and 757 deletions
|
|
@ -577,6 +577,21 @@ AND auth_key_id NOT IN (
|
|||
},
|
||||
Rollback: func(db *gorm.DB) error { return nil },
|
||||
},
|
||||
{
|
||||
// Rename forced_tags column to tags in nodes table.
|
||||
// This must run after migration 202505141324 which creates tables with forced_tags.
|
||||
ID: "202511131445-node-forced-tags-to-tags",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
// Rename the column from forced_tags to tags
|
||||
err := tx.Migrator().RenameColumn(&types.Node{}, "forced_tags", "tags")
|
||||
if err != nil {
|
||||
return fmt.Errorf("renaming forced_tags to tags: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
Rollback: func(db *gorm.DB) error { return nil },
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue