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 new database tables and the associated operations for profile selectors #3720

Closed
jhrozek opened this issue Jun 26, 2024 · 1 comment · Fixed by #3731
Closed

Add new database tables and the associated operations for profile selectors #3720

jhrozek opened this issue Jun 26, 2024 · 1 comment · Fixed by #3731
Assignees

Comments

@jhrozek
Copy link
Contributor

jhrozek commented Jun 26, 2024

We need to add the table and the basic CRUD operation for the table

@jhrozek jhrozek self-assigned this Jun 26, 2024
@jhrozek
Copy link
Contributor Author

jhrozek commented Jun 26, 2024

Table would look somewhat like this:

CREATE TABLE IF NOT EXISTS profile_selectors (
  id UUID NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY,
  profile_id UUID NOT NULL REFERENCES profiles(id) ON DELETE CASCADE,
  entity entities, -- this is nullable since it can be applicable to all
  selector TEXT NOT NULL, -- CEL expression
  comment TEXT NOT NULL, -- optional comment (can be empty string)
);

-- Ensure we have performant search based on profile_id
CREATE INDEX idx_profile_selectors_on_profile ON profile_selectors(profile_id);

jhrozek added a commit to jhrozek/minder that referenced this issue Jun 27, 2024
Adds the table for the profile selectors.

Related: mindersec#3720
jhrozek added a commit to jhrozek/minder that referenced this issue Jun 27, 2024
Adds the needed SQL methods to manage profile selectors

Fixes: mindersec#3720
jhrozek added a commit to jhrozek/minder that referenced this issue Jun 27, 2024
Adds the needed SQL methods to manage profile selectors

Fixes: mindersec#3720
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant