Files
SpiceManagementSystem/database/migrations/2024_10_04_162206_create_spices_table.php
T
2026-09-11 01:17:47 +02:00

31 lines
661 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('spices', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->decimal('quantity', 10, 2)->default(0);
$table->string('unit');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('spices');
}
};