Files
nuhodds_fi4/database/migrations/2025_08_24_131703_group.php
T
2025-08-24 20:33:57 +02:00

31 lines
664 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('groups', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->integer('sport_id');
$table->integer('country_id')->default(0);
$table->timestamps();
$table->index(['sport_id']);
$table->index(['country_id']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('groups');
}
};