46 lines
1.5 KiB
PHP
46 lines
1.5 KiB
PHP
<?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::create('rounds', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->timestamps();
|
|
$table->unsignedBigInteger('contest_id');
|
|
$table->json('name');
|
|
$table->json('description')->nullable();
|
|
$table->dateTime('start_time');
|
|
$table->dateTime('end_time');
|
|
$table->dateTime('logs_deadline');
|
|
$table->boolean('is_mcr')->default(false)->index();
|
|
$table->boolean('is_active')->default(false)->index();
|
|
$table->boolean('is_test')->default(false)->index();
|
|
$table->boolean('is_sixhr')->default(false)->index();
|
|
$table->datetime('first_check')->nullable();
|
|
$table->datetime('second_check')->nullable();
|
|
$table->datetime('unique_qso_check')->nullable();
|
|
$table->datetime('third_check')->nullable();
|
|
$table->datetime('fourth_check')->nullable();
|
|
$table->datetime('prelimitary_results')->nullable();
|
|
|
|
$table->foreign('contest_id')->references('id')->on('contests')->cascadeOnDelete();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('rounds');
|
|
}
|
|
};
|