Your IP : 216.73.216.91


Current Path : /var/www/html/LLCF-APP/database/migrations/
Upload File :
Current File : //var/www/html/LLCF-APP/database/migrations/2025_10_21_170236_create_expenses_table.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('expenses', function (Blueprint $table) {
            $table->id();
            $table->foreignId('item_id')
                  ->constrained('items')
                  ->onDelete('cascade');            
            $table->date('date');
            $table->enum('type', ['llcf', 'bocado']);
            $table->decimal('amount', 10, 2);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('expenses');
    }
};