New-site/database/migrations/2024_01_31_025427_create_sc...
Dhaverd e6827b7c62
Some checks are pending
Gitea Actions / Build and deploy (push) Waiting to run
Поправил миграции
2024-04-21 14:38:06 +08:00

35 lines
885 B
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('schedules', function (Blueprint $table) {
$table->id("id");
$table->foreignId("weekday_id")->constrained(
table: "weekdays", column: "id", indexName: "constraint_weekday_id"
);
$table->foreignId("game_id")->constrained(
table: "games", column: "id", indexName: "constraint_game_id"
);
$table->text("stream_time");
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('schedules');
}
};