Compare commits
No commits in common. "de34052c3b8306f8ae2ae428a1eff08175738148" and "8b00d29db3870be869f5c6abc2dc0f3fd50c3777" have entirely different histories.
de34052c3b
...
8b00d29db3
@ -25,7 +25,7 @@ class ZoneCheck extends Command
|
|||||||
$this->warn('Zone: '.$zo->zone_id);
|
$this->warn('Zone: '.$zo->zone_id);
|
||||||
$this->info(sprintf('- Our address(es): %s',our_address($do)->pluck('ftn4d')->join(',')));
|
$this->info(sprintf('- Our address(es): %s',our_address($do)->pluck('ftn4d')->join(',')));
|
||||||
|
|
||||||
$this->table(['id','ftn','role','parent','children','downlinks','uplink','send from','region_id','system','notes'],$zo->addresses()->FTNorder()->active()->with(['system'])->dontCache()->get()->transform(function($item) {
|
$this->table(['id','ftn','role','parent','children','downlinks','uplink','send from','region_id','system','notes'],$zo->addresses()->FTNorder()->active()->with(['system'])->get()->transform(function($item) {
|
||||||
return [
|
return [
|
||||||
'id'=>$item->id,
|
'id'=>$item->id,
|
||||||
'ftn'=>$item->ftn4d,
|
'ftn'=>$item->ftn4d,
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
<?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('addresses', function (Blueprint $table) {
|
|
||||||
$table->dropForeign(['hub_id']);
|
|
||||||
$table->unique(['zone_id','region_id','host_id','id']);
|
|
||||||
$table->foreign(['zone_id','region_id','host_id','hub_id'])->references(['zone_id','region_id','host_id','id'])->on('addresses');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*/
|
|
||||||
public function down(): void
|
|
||||||
{
|
|
||||||
Schema::table('addresses', function (Blueprint $table) {
|
|
||||||
$table->dropForeign(['zone_id','region_id','host_id','hub_id']);
|
|
||||||
$table->dropUnique(['zone_id','region_id','host_id','id']);
|
|
||||||
$table->foreign('hub_id')->references('id')->on('addresses');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user