[PR #899] [MERGED] Fix deleting database host when it has assigned nodes #1041

Closed
opened 2026-02-04 19:12:39 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/panel/pull/899
Author: @PseudoResonance
Created: 1/9/2025
Status: Merged
Merged: 1/9/2025
Merged by: @rmartinoscar

Base: mainHead: fix-delete-database-host-when-assigned-node


📝 Commits (3)

  • 1ed1e97 Cascade delete from database_host_node when the database host is deleted
  • 5ae9084 Update database/migrations/2025_01_09_143607_database_host_node_foreign_delete_cascade.php
  • f33670e Update 2025_01_09_143607_database_host_node_foreign_delete_cascade.php

📊 Changes

1 file changed (+24 additions, -0 deletions)

View changed files

database/migrations/2025_01_09_143607_database_host_node_foreign_delete_cascade.php (+24 -0)

📄 Description

Deleting a database host with assigned nodes currently throws a foreign key constraint error. This migration will cascade delete the node assignments as well, but maybe it'd be preferable to just show an error and ask the user to remove the node assignments?


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pelican-dev/panel/pull/899 **Author:** [@PseudoResonance](https://github.com/PseudoResonance) **Created:** 1/9/2025 **Status:** ✅ Merged **Merged:** 1/9/2025 **Merged by:** [@rmartinoscar](https://github.com/rmartinoscar) **Base:** `main` ← **Head:** `fix-delete-database-host-when-assigned-node` --- ### 📝 Commits (3) - [`1ed1e97`](https://github.com/pelican-dev/panel/commit/1ed1e97088dd7e935aac837ae628d8e8a5b9e24b) Cascade delete from database_host_node when the database host is deleted - [`5ae9084`](https://github.com/pelican-dev/panel/commit/5ae90848676cd73b6769a077cedb22d47b4f6e13) Update database/migrations/2025_01_09_143607_database_host_node_foreign_delete_cascade.php - [`f33670e`](https://github.com/pelican-dev/panel/commit/f33670e4b308ae20eb1df0e68a0388019190ab99) Update 2025_01_09_143607_database_host_node_foreign_delete_cascade.php ### 📊 Changes **1 file changed** (+24 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `database/migrations/2025_01_09_143607_database_host_node_foreign_delete_cascade.php` (+24 -0) </details> ### 📄 Description Deleting a database host with assigned nodes currently throws a foreign key constraint error. This migration will cascade delete the node assignments as well, but maybe it'd be preferable to just show an error and ask the user to remove the node assignments? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-04 19:12:39 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel#1041