Skip to content

Commit

Permalink
lxd-to-incus: Mangle project and profile descriptions
Browse files Browse the repository at this point in the history
Closes #286

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Dec 8, 2023
1 parent 9089a80 commit b38e618
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/lxd-to-incus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ func (c *cmdMigrate) Run(app *cobra.Command, args []string) error {
}
}

// Mangle profiles and projects.
if !c.flagClusterMember {
rewriteStatements = append(rewriteStatements, fmt.Sprintf("UPDATE profiles SET description='Default Incus profile' WHERE description='Default LXD profile';"))
rewriteStatements = append(rewriteStatements, fmt.Sprintf("UPDATE projects SET description='Default Incus project' WHERE description='Default LXD project';"))
}

// Log rewrite actions.
_, _ = logFile.WriteString("Rewrite SQL statements:\n")
for _, entry := range rewriteStatements {
Expand Down

0 comments on commit b38e618

Please sign in to comment.