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

migrations(issue-views): Add projects, environemnts, time_filters, columns to GroupSearchView table #83284

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MichaelSun48
Copy link
Member

@MichaelSun48 MichaelSun48 commented Jan 10, 2025

This PR adds new columns to the GroupSearchView table to represent the new filters we'd like to add to Issue Views: projects, environments, and time_filters.

More details and explanations for types can be found in this tech spec (internal only)

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 10, 2025
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #83284      +/-   ##
==========================================
+ Coverage   87.47%   87.48%   +0.01%     
==========================================
  Files        9406     9408       +2     
  Lines      537270   537383     +113     
  Branches    21158    21158              
==========================================
+ Hits       469986   470147     +161     
+ Misses      66927    66879      -48     
  Partials      357      357              

Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/0813_create_groupsearchview_page_filter_columns.py ()

--
-- Add field environments to groupsearchview
--
ALTER TABLE "sentry_groupsearchview" ADD COLUMN "environments" text[] DEFAULT '{}' NULL;
ALTER TABLE "sentry_groupsearchview" ALTER COLUMN "environments" DROP DEFAULT;
--
-- Add field projects to groupsearchview
--
ALTER TABLE "sentry_groupsearchview" ADD COLUMN "projects" text[] DEFAULT '{}' NULL;
ALTER TABLE "sentry_groupsearchview" ALTER COLUMN "projects" DROP DEFAULT;
--
-- Add field time_filters to groupsearchview
--
ALTER TABLE "sentry_groupsearchview" ADD COLUMN "time_filters" jsonb DEFAULT '{"period": "14d"}'::jsonb NULL;
ALTER TABLE "sentry_groupsearchview" ALTER COLUMN "time_filters" DROP DEFAULT;

@MichaelSun48 MichaelSun48 force-pushed the msun/issueViews/createPageFilterColumns branch from eafaa33 to 8f95206 Compare January 14, 2025 01:59
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/0814_create_groupsearchview_page_filter_columns.py ()

--
-- Add field environments to groupsearchview
--
ALTER TABLE "sentry_groupsearchview" ADD COLUMN "environments" text[] DEFAULT '{}' NULL;
ALTER TABLE "sentry_groupsearchview" ALTER COLUMN "environments" DROP DEFAULT;
--
-- Add field projects to groupsearchview
--
ALTER TABLE "sentry_groupsearchview" ADD COLUMN "projects" text[] DEFAULT '{}' NULL;
ALTER TABLE "sentry_groupsearchview" ALTER COLUMN "projects" DROP DEFAULT;
--
-- Add field time_filters to groupsearchview
--
ALTER TABLE "sentry_groupsearchview" ADD COLUMN "time_filters" jsonb DEFAULT '{"period": "14d"}'::jsonb NULL;
ALTER TABLE "sentry_groupsearchview" ALTER COLUMN "time_filters" DROP DEFAULT;

@MichaelSun48 MichaelSun48 changed the title migrations(issue-views): Add projects, environemnts, time_filters, and is_all_projects column to GroupSearchView table migrations(issue-views): Add projects, environemnts, time_filters, columns to GroupSearchView table Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant