Skip to content

mig: make custom_domains domain unique index partial#1488

Merged
adaam2 merged 2 commits intomainfrom
chore/custom-domains-partial-unique-index
Feb 4, 2026
Merged

mig: make custom_domains domain unique index partial#1488
adaam2 merged 2 commits intomainfrom
chore/custom-domains-partial-unique-index

Conversation

@adaam2
Copy link
Member

@adaam2 adaam2 commented Feb 4, 2026

Summary

  • Scopes the custom_domains_domain_key unique index to WHERE deleted IS FALSE, matching the existing custom_domains_organization_id_key index
  • Allows re-registration of a domain after soft-deletion

Test plan

  • Migration applies cleanly
  • Soft-deleted domains no longer block new registrations with the same domain name

🤖 Generated with Claude Code


Open with Devin

Scope the unique index on custom_domains.domain to non-deleted rows
so that soft-deleted domains don't block re-registration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gram-docs-redirect Ready Ready Preview, Comment Feb 4, 2026 3:21pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2026

⚠️ No Changeset found

Latest commit: f8ea92d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View issue and 2 additional flags in Devin Review.

Open in Devin Review

@adaam2 adaam2 mentioned this pull request Feb 4, 2026
4 tasks
Create new partial index first, then drop old, then rename.
This avoids a window with no uniqueness enforcement.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

atlas migrate lint on server/migrations

Status Step Result
1 new migration file detected 20260204150828_custom-domains-partial-unique-index.sql
ERD and visual diff generated View Visualization
No issues found View Report
Read the full linting report on Atlas Cloud

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

atlas migrate lint on server/clickhouse/migrations

Status Step Result
No migration files detected  
ERD and visual diff generated View Visualization
No issues found View Report
Read the full linting report on Atlas Cloud

@github-actions github-actions bot added the preview Spawn a preview environment label Feb 4, 2026
@speakeasybot
Copy link
Collaborator

speakeasybot commented Feb 4, 2026

🚀 Preview Environment (PR #1488)

Preview URL: https://pr-1488.dev.getgram.ai

Component Status Details Updated (UTC)
✅ Database Ready Created and validated 2026-02-04 15:32:30.
✅ Images Available Container images ready 2026-02-04 15:31:49.

Gram Preview Bot

@adaam2 adaam2 merged commit ee1bff2 into main Feb 4, 2026
45 of 46 checks passed
@adaam2 adaam2 deleted the chore/custom-domains-partial-unique-index branch February 4, 2026 17:00
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

preview Spawn a preview environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants