mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 22:14:45 +02:00
Fix deleting node with database host
* fix: delete database host when node is deleted * chore: revert change to file
This commit is contained in:
parent
00644c2c60
commit
f684da997c
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('database_host_node', function (Blueprint $table) {
|
||||
$table->dropForeign(['node_id']);
|
||||
|
||||
$table->foreign('node_id')->references('id')->on('nodes')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user