Skip to content

Conversation

@DominikB2014
Copy link
Contributor

This updates the unique title constraint to only apply for non-prebuilt dashboards. This allows us to built prebuilt ones with the same title as an existing user created on. The UI will distinguish the two by the author field

@DominikB2014 DominikB2014 requested a review from a team November 26, 2025 15:40
@DominikB2014 DominikB2014 requested a review from a team as a code owner November 26, 2025 15:40
@linear
Copy link

linear bot commented Nov 26, 2025

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

This PR has a migration; here is the generated SQL for src/sentry/migrations/1008_loosen_unique_title_contraint.py

for 1008_loosen_unique_title_contraint in sentry

--
-- Alter unique_together for dashboard (0 constraint(s))
--
ALTER TABLE "sentry_dashboard" DROP CONSTRAINT "sentry_dashboard_organization_id_title_6ca343f8_uniq";
--
-- Create constraint sentry_dashboard_organization_title_uniq on model dashboard
--
CREATE UNIQUE INDEX CONCURRENTLY "sentry_dashboard_organization_title_uniq" ON "sentry_dashboard" ("organization_id", "title") WHERE "prebuilt_id" IS NULL;

@DominikB2014 DominikB2014 enabled auto-merge (squash) November 26, 2025 15:53
@DominikB2014 DominikB2014 merged commit 7ee9621 into master Nov 26, 2025
68 checks passed
@DominikB2014 DominikB2014 deleted the dominikbuszowiecki/browse-142-update-unique-title-constraint-on-dashboards-model branch November 26, 2025 16:05
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.

3 participants