MIF_E31210592/database/migrations/2024_03_11_000007_mata_pela...

33 lines
789 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('mata_pelajaran', function (Blueprint $table) {
$table->bigIncrements('id_mapel');
$table->string('nama_mapel', 100)->nullable(false);
// $table->unsignedBigInteger('id_kelas');
$table->timestamps();
// $table->foreign('id_kelas')->references('id_kelas')->on('kelas')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('mata_pelajaran');
}
};