Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add description field on certificate entries #297

Merged
merged 5 commits into from
Dec 11, 2023

Conversation

presztak
Copy link
Contributor

Adds description field on certificate entries and possibility to modify description using API.

Closes #246

@github-actions github-actions bot added Documentation Documentation needs updating API Changes to the REST API labels Dec 11, 2023
@stgraber
Copy link
Member

 Error: internal/server/db/cluster/update.go:112:56: Comment should end in a period (godot)
// updateFromV69 adds description column to certificate

// updateFromV69 adds description column to certificate.
func updateFromV69(ctx context.Context, tx *sql.Tx) error {
q := `
ALTER TABLE certificates ADD COLUMN description TEXT NOT NULL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to fail to run on any Incus system that has a DB entry in the certificates table.

This is going to need a DEFAULT "" to avoid this problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, that's right. Fixed.

@stgraber
Copy link
Member

Looks good, just that small schema issue and it should be good to go.

@stgraber stgraber merged commit 521fb47 into lxc:main Dec 11, 2023
25 checks passed
@stgraber
Copy link
Member

Thanks @presztak!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes to the REST API Documentation Documentation needs updating
Development

Successfully merging this pull request may close these issues.

Add description field on certificate entries
2 participants