Skip to content

Commit

Permalink
Add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
lieselwd committed Oct 27, 2024
1 parent 624fbfa commit 450aaba
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
public function up(): void
{
Schema::create('datalink_authorities', function (Blueprint $table) {
$table->string('id')->unique()->primary();
$table->string('name');
$table->string('prefix')->unique();
$table->boolean('auto_acknowledge_participant')->default(false);
$table->boolean('valid_rcl_target')->default(true);
$table->boolean('system')->default(false);
$table->timestamps();
});
}

public function down(): void
{
Schema::dropIfExists('datalink_authorities');
}
};
112 changes: 112 additions & 0 deletions database/seeders/DatalinkAuthoritiesSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?php

namespace Database\Seeders;

use App\Enums\DatalinkAuthorities;
use App\Models\DatalinkAuthority;
use Illuminate\Database\Seeder;

class DatalinkAuthoritiesSeeder extends Seeder
{
public function run(): void
{
DatalinkAuthority::updateOrCreate([
'id' => 'CZQO',
'name' => 'Gander',
'prefix' => 'CZQO',
'auto_acknowledge_participant' => true,
'valid_rcl_target' => true,
'system' => false,
]);

DatalinkAuthority::updateOrCreate([
'id' => 'EGGX',
'name' => 'Shanwick',
'prefix' => 'EGGX',
'auto_acknowledge_participant' => true,
'valid_rcl_target' => true,
'system' => false,
]);

DatalinkAuthority::updateOrCreate([
'id' => 'BIRD',
'name' => 'Reykjavik',
'prefix' => 'BIRD',
'auto_acknowledge_participant' => true,
'valid_rcl_target' => true,
'system' => false,
]);

DatalinkAuthority::updateOrCreate([
'id' => 'KZNY',
'name' => 'New York',
'prefix' => 'NY',
'auto_acknowledge_participant' => true,
'valid_rcl_target' => false,
'system' => false,
]);

DatalinkAuthority::updateOrCreate([
'id' => 'LPPO',
'name' => 'Santa Maria',
'prefix' => 'LPPO',
'auto_acknowledge_participant' => true,
'valid_rcl_target' => false,
'system' => false,
]);

DatalinkAuthority::updateOrCreate([
'id' => 'NAT',
'name' => 'North Atlantic Bandbox',
'prefix' => 'NAT',
'auto_acknowledge_participant' => true,
'valid_rcl_target' => false,
'system' => false,
]);

DatalinkAuthority::updateOrCreate([
'id' => 'CZQXD',
'name' => 'Gander Domestic',
'prefix' => 'CZQX',
'auto_acknowledge_participant' => false,
'valid_rcl_target' => false,
'system' => false,
]);

DatalinkAuthority::updateOrCreate([
'id' => 'CZQXM',
'name' => 'Moncton Domestic',
'prefix' => 'CZQM',
'auto_acknowledge_participant' => false,
'valid_rcl_target' => false,
'system' => false,
]);

DatalinkAuthority::updateOrCreate([
'id' => 'EISN',
'name' => 'Shannon Domestic',
'prefix' => 'EISN',
'auto_acknowledge_participant' => false,
'valid_rcl_target' => false,
'system' => false,
]);

DatalinkAuthority::updateOrCreate([
'id' => 'SYST',
'name' => 'natTrak System',
'prefix' => 'SYST',
'auto_acknowledge_participant' => false,
'valid_rcl_target' => false,
'system' => true,
]);

DatalinkAuthority::updateOrCreate([
'id' => 'OCEN',
'name' => 'Oceanic Controller',
'prefix' => 'OCEN',
'auto_acknowledge_participant' => true,
'valid_rcl_target' => false,
'system' => true,
]);
}
}

0 comments on commit 450aaba

Please sign in to comment.