Files
WebAPP/database/migrations/0039_01_01_000001_create_finances_table.php
Rhino 4eaf2368af Finanzverwaltung und Saison-System
Neues Einnahmen-/Ausgaben-Modul mit Kategorie-Filter, Monats-Charts und
Saison-basierter Filterung. Saison-Verwaltung im Admin-Bereich mit
Möglichkeit zum Wechsel der aktuellen Saison.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 23:48:20 +01:00

33 lines
935 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('finances', function (Blueprint $table) {
$table->id();
$table->foreignId('team_id')->nullable()->constrained()->nullOnDelete();
$table->string('type', 10);
$table->string('category', 30);
$table->string('title', 150);
$table->integer('amount');
$table->date('date');
$table->text('notes')->nullable();
$table->foreignId('created_by')->constrained('users');
$table->timestamps();
$table->index(['team_id', 'date']);
$table->index(['type', 'date']);
});
}
public function down(): void
{
Schema::dropIfExists('finances');
}
};