Rework address roles, making Address::role optional, rework determining uplink/downlinks/parent/children
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?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
|
||||
{
|
||||
DB::update('ALTER TABLE addresses ALTER COLUMN role DROP NOT NULL');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@@ -120,7 +120,7 @@ class TestNodeHierarchy extends Seeder
|
||||
'node_id'=>$nid,
|
||||
'point_id'=>0,
|
||||
'system_id'=>$so->id,
|
||||
'role'=>Address::NODE_ACTIVE,
|
||||
'role'=>Address::NODE_NN,
|
||||
'created_at'=>Carbon::now(),
|
||||
'updated_at'=>Carbon::now(),
|
||||
]);
|
||||
@@ -167,7 +167,7 @@ class TestNodeHierarchy extends Seeder
|
||||
'node_id'=>$nid,
|
||||
'point_id'=>0,
|
||||
'system_id'=>$so->id,
|
||||
'role'=>Address::NODE_ACTIVE,
|
||||
'role'=>Address::NODE_NN,
|
||||
'created_at'=>Carbon::now(),
|
||||
'updated_at'=>Carbon::now(),
|
||||
]);
|
||||
@@ -214,7 +214,7 @@ class TestNodeHierarchy extends Seeder
|
||||
'node_id'=>$nid,
|
||||
'point_id'=>0,
|
||||
'system_id'=>$so->id,
|
||||
'role'=>Address::NODE_ACTIVE,
|
||||
'role'=>Address::NODE_NN,
|
||||
'created_at'=>Carbon::now(),
|
||||
'updated_at'=>Carbon::now(),
|
||||
]);
|
||||
@@ -251,7 +251,7 @@ class TestNodeHierarchy extends Seeder
|
||||
'point_id'=>0,
|
||||
'system_id'=>$so->id,
|
||||
'hub_id'=>$hub->id,
|
||||
'role'=>Address::NODE_ACTIVE,
|
||||
'role'=>Address::NODE_NN,
|
||||
'created_at'=>Carbon::now(),
|
||||
'updated_at'=>Carbon::now(),
|
||||
]);
|
||||
|
Reference in New Issue
Block a user