add PIREP pre-file and ACARS updates; removing caching from ACARS/Pirep/User repositories; adjust PirepState enum values; add additional columns
This commit is contained in:
@@ -22,10 +22,10 @@ class CreateFlightTables extends Migration
|
||||
$table->string('dpt_airport_id', 5);
|
||||
$table->string('arr_airport_id', 5);
|
||||
$table->string('alt_airport_id', 5)->nullable();
|
||||
$table->text('route')->nullable();
|
||||
$table->string('dpt_time', 10)->nullable();
|
||||
$table->string('arr_time', 10)->nullable();
|
||||
$table->unsignedDecimal('flight_time', 19)->nullable();
|
||||
$table->text('route')->nullable();
|
||||
$table->text('notes')->nullable();
|
||||
$table->boolean('has_bid')->default(false);
|
||||
$table->boolean('active')->default(true);
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Enums\PirepState;
|
||||
use App\Models\Enums\PirepStatus;
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
@@ -24,14 +27,16 @@ class CreatePirepTables extends Migration
|
||||
$table->string('route_leg', 5)->nullable();
|
||||
$table->string('dpt_airport_id', 5);
|
||||
$table->string('arr_airport_id', 5);
|
||||
$table->unsignedDecimal('flight_time', 19);
|
||||
$table->unsignedInteger('altitude')->nullable();
|
||||
$table->unsignedDecimal('flight_time', 19)->nullable();
|
||||
$table->unsignedDecimal('planned_flight_time', 19)->nullable();
|
||||
$table->unsignedDecimal('gross_weight', 19)->nullable();
|
||||
$table->unsignedDecimal('fuel_used', 19)->nullable();
|
||||
$table->string('route', 250)->nullable();
|
||||
$table->string('notes', 250)->nullable();
|
||||
$table->text('route')->nullable();
|
||||
$table->text('notes')->nullable();
|
||||
$table->unsignedTinyInteger('source')->default(0);
|
||||
$table->tinyInteger('state')->default(0); # -1 rejected, 0 pending, 1 accepted
|
||||
#$table->tinyInteger('status')->default(0); # -1 rejected, 0 pending, 1 accepted
|
||||
$table->tinyInteger('state')->default(PirepState::PENDING);
|
||||
$table->tinyInteger('status')->default(PirepStatus::SCHEDULED);
|
||||
$table->longText('raw_data')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
@@ -14,22 +14,24 @@ class CreateAcarsTables extends Migration
|
||||
public function up()
|
||||
{
|
||||
Schema::create('acars', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('id', 12);
|
||||
$table->string('pirep_id', 12);
|
||||
$table->string('name', 10)->nullable();
|
||||
$table->float('lat', 7, 4)->default(0.0);
|
||||
$table->float('lon', 7, 4)->default(0.0);
|
||||
|
||||
# TODO: More columns here for what might be required
|
||||
|
||||
# polymorphic relation columns.
|
||||
# parent_type can be flight, pirep or acars
|
||||
# once
|
||||
#$table->unsignedBigInteger('parent_id');
|
||||
#$table->string('parent_type');
|
||||
$table->unsignedInteger('heading')->nullable();
|
||||
$table->unsignedInteger('altitude')->nullable();
|
||||
$table->integer('vs')->nullable();
|
||||
$table->unsignedInteger('gs')->nullable();
|
||||
$table->unsignedInteger('transponder')->nullable();
|
||||
$table->string('autopilot')->nullable();
|
||||
$table->decimal('fuel_flow')->nullable();
|
||||
$table->dateTimeTz('sim_time')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->primary('id');
|
||||
$table->index('pirep_id');
|
||||
$table->index('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user