Skip to content

Commit

Permalink
🗃️ add id, arrival, departure index to stopovers (#2599)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKrisKrisu authored May 25, 2024
1 parent d0e552c commit 76ec77f
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?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::table('train_stopovers', static function(Blueprint $table) {
$table->index(['trip_id', 'arrival_planned', 'departure_planned'], 'index_trip_id_arrival_departure');
});
}

public function down(): void {
Schema::table('train_stopovers', static function(Blueprint $table) {
$table->dropIndex('index_trip_id_arrival_departure');
});
}
};

0 comments on commit 76ec77f

Please sign in to comment.