Skip to content

Commit

Permalink
Implement suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
lieselwd committed Oct 28, 2024
1 parent 0c3c279 commit a662997
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/ClxMessagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function transmit(RclMessage $rclMessage, ClxMessageRequest $request)
'entry_time_restriction' => $entryRequirement ?? null,
'raw_entry_time_restriction' => $request->get('entry_time_requirement'),
'free_text' => $isReclearance ? '** RECLEARANCE '.now()->format('Hi').' ** '.$request->get('free_text') : $request->get('free_text'),
'datalink_authority_id' => DatalinkAuthority::whereId($request->get('datalink_authority'))->first()->id,
'datalink_authority_id' => $request->get('datalink_authority_id'),
'is_concorde' => $rclMessage->is_concorde,
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ public function up(): void
public function down(): void
{
Schema::table('clx_messages', function (Blueprint $table) {
Schema::table('clx_messages', function (Blueprint $table) {
$table->renameColumn('datalink_authority_id', 'datalink_authority');
});
$table->renameColumn('datalink_authority_id', 'datalink_authority');
});

Schema::table('cpdlc_messages', function (Blueprint $table) {
$table->renameColumn('datalink_authority_id', 'datalink_authority');
});
Schema::table('cpdlc_messages', function (Blueprint $table) {
$table->renameColumn('datalink_authority_id', 'datalink_authority');
});
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ public function up(): void
public function down(): void
{
Schema::table('clx_messages', function (Blueprint $table) {
Schema::table('clx_messages', function (Blueprint $table) {
$table->dropForeign('clx_messages_datalink_authority_id_foreign');
$table->string('datalink_authority', 4)->default('NATX')->change();
});
$table->dropForeign('clx_messages_datalink_authority_id_foreign');
$table->string('datalink_authority', 4)->default('NATX')->change();
});

Schema::table('cpdlc_messages', function (Blueprint $table) {
$table->dropForeign('cpdlc_messages_datalink_authority_id_foreign');
$table->string('datalink_authority', 4)->default(null)->change();
});
Schema::table('cpdlc_messages', function (Blueprint $table) {
$table->dropForeign('cpdlc_messages_datalink_authority_id_foreign');
$table->string('datalink_authority', 4)->default(null)->change();
});
}
};

0 comments on commit a662997

Please sign in to comment.