Files
nuhodds_fi4/database/migrations/2026_04_20_145255_mongo_event.php
T
2026-05-11 08:19:25 +02:00

34 lines
774 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
use MongoDB\Laravel\Schema\Blueprint;
return new class extends Migration
{
protected $connection = 'mongodb';
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('events', function (Blueprint $collection) {
$collection->index('sport_id');
$collection->index('match_id');
$collection->index('league_id');
$collection->index('home_id');
$collection->index('away_id');
$collection->index('starttime');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('events');
}
};