31 lines
664 B
PHP
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');
|
|
}
|
|
};
|