Skip to content

Commit 6d669c6

Browse files
committed
Migrate namespace_id to user_id column in machine and pak
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
1 parent 8dadb04 commit 6d669c6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

db.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ func (h *Headscale) initDB() error {
4848
return err
4949
}
5050

51+
_ = db.Migrator().RenameColumn(&Machine{}, "namespace_id", "user_id")
52+
_ = db.Migrator().RenameColumn(&PreAuthKey{}, "namespace_id", "user_id")
53+
5154
_ = db.Migrator().RenameColumn(&Machine{}, "ip_address", "ip_addresses")
5255
_ = db.Migrator().RenameColumn(&Machine{}, "name", "hostname")
5356

0 commit comments

Comments
 (0)