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

Contextual error toasts for deleting referenced rows #23135

Merged

Conversation

joshenlim
Copy link
Member

Screenshot 2024-04-22 at 15 26 35

@joshenlim joshenlim requested a review from a team as a code owner April 22, 2024 08:27
Copy link

supabase bot commented Apr 22, 2024

No changes detected in supabase directory.
This pull request has been ignored for the connected project xguihxuzqibwxjnimxev due to its connection settings.
Go to Project Integrations Settings ↗︎ in order to change this behavior.


Branching Preview Branches by Supabase.
Learn more about Supabase for Git ↗︎.

Copy link

vercel bot commented Apr 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
database-new 🔄 Building (Inspect) Visit Preview May 2, 2024 5:08am
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2024 5:08am
studio-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2024 5:08am
ui-storybook 🔄 Building (Inspect) Visit Preview May 2, 2024 5:08am
zone-www-dot-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2024 5:08am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
studio ⬜️ Ignored (Inspect) Visit Preview May 2, 2024 5:08am
studio-self-hosted ⬜️ Ignored (Inspect) Visit Preview May 2, 2024 5:08am

const initialMessage = isMultipleRows
? `Unable to delete rows as one of them is currently referenced by a foreign key constraint from the table \`${referencingTable}\`.`
: `Unable to delete row as it is currently referenced by a foreign key constraint from the table \`${referencingTable}\`.`
const resolutionCTA = `Set a cascade behaviour on the foreign key relation \`${fkName}\` in the \`${referencingTable}\` table to automatically respond when row(s) are being deleted in the \`${sourceTable}\` table.`
Copy link
Contributor

Choose a reason for hiding this comment

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

[misspell] reported by reviewdog 🐶
"behaviour" is a misspelling of "behavior"

Copy link
Member

@alaister alaister left a comment

Choose a reason for hiding this comment

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

LGTM!

@joshenlim joshenlim merged commit 0d292c6 into master May 2, 2024
15 of 16 checks passed
@joshenlim joshenlim deleted the chore/contextual-error-toasts-for-deleting-referenced-rows branch May 2, 2024 05:58
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 this pull request may close these issues.

None yet

2 participants