siakad-itm/database/migrations/2026_08_24_000003_create_schedules_table.php
Yoga Pangestu 73f41729d1
Some checks failed
tests / ci (pull_request) Has been cancelled
feat: add schedule management functionality with CRUD operations
2026-08-24 18:32:44 +07:00

28 lines
802 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('schedules', function (Blueprint $table) {
$table->id();
$table->foreignId('course_class_id')->constrained()->cascadeOnDelete();
$table->string('day_of_week', 15)->nullable();
$table->time('start_time')->nullable();
$table->time('end_time')->nullable();
$table->string('room', 20)->nullable();
$table->string('online_link', 255)->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('schedules');
}
};