Files
ilycats/database/migrations/2026_01_22_004012_create_supplies_table.php
2026-02-08 15:16:35 +07:00

34 lines
776 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('supplies', function (Blueprint $table) {
$table->id();
$table->string('nama_perlengkapan');
$table->string('foto_produk')->nullable();
$table->unsignedBigInteger('category_id')->nullable(); // First occurrence
$table->decimal('qty', 10, 2);
$table->string('unit');
$table->string('kategori')->default('Umum');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('supplies');
}
};