gastrosaw/database/migrations/2026_03_03_065726_create_ma...

38 lines
897 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('makanan', function (Blueprint $table) {
$table->id();
$table->string('nama_makanan');
$table->float('protein');
$table->float('kandungan_lemak');
$table->float('karbohidrat');
$table->float('kandungan_serat');
$table->integer('kalori');
$table->string('cara_pengolahan');
$table->string('alternatif_serupa')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('makanan');
}
};