ledgerrz/database/migrations/2026_06_14_222648_create_mutations_table.php
Daan Meijer 1e0782385b
Some checks failed
linter / quality (push) Failing after 1m5s
tests / ci (8.4) (push) Failing after 1m7s
tests / ci (8.5) (push) Failing after 1m5s
tests / ci (8.3) (push) Failing after 12m5s
over naar uuids, policies, predefined mutations aan kunnen passen
2026-06-21 23:09:38 +02:00

34 lines
914 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('mutations', function (Blueprint $table) {
$table->id();
$table->foreignId('ledger_id')->constrained()->cascadeOnDelete();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->string('type');
$table->integer('amount');
$table->text('description')->nullable();
$table->string('status')->default('pending'); // pending, approved, rejected, voided
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('mutations');
}
};