Migration: keuangan

 avatar
user_3285855
php
6 months ago
827 B
6
Indexable
Never
<?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('keuangan', function (Blueprint $table) {
            $table->id();
            $table->foreignId('id_kategori')->constrained('kategori');
            $table->foreignId('id_pengguna')->constrained('users');
            $table->integer('jumlah');
            $table->date('tanggal');
            $table->string('deskripsi');
            $table->boolean('jenis');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('keuangan');
    }
};
Leave a Comment