Updated scheduled tasks

This commit is contained in:
2026-07-02 23:11:46 +10:00
parent 4c98b33fb4
commit 00bd30fc5e
17 changed files with 397 additions and 667 deletions
@@ -0,0 +1,30 @@
<?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('user_flights', function (Blueprint $table) {
$table->timestamp('arrival_processed_at')->nullable()->after('departure_processed_at');
});
DB::table('user_flights')
->where('arrival_date', '<=', now()->utc())
->whereNull('arrival_processed_at')
->update(['arrival_processed_at' => now()->utc()]);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
}
};