refactor(ticket): use refunds as amount source

This commit is contained in:
2026-09-14 12:29:13 -03:00
parent caed44fcc8
commit 67deca095e
9 changed files with 114 additions and 34 deletions

View File

@@ -0,0 +1,22 @@
<?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::table('compra_items', function (Blueprint $table): void {
$table->dropColumn('refunded_amount');
});
}
public function down(): void
{
Schema::table('compra_items', function (Blueprint $table): void {
$table->decimal('refunded_amount', 10, 2)->default(0)->after('total');
});
}
};