fix: null check budget, cegah duplikasi approval/vote, tambah related_type di votes

This commit is contained in:
2026-04-05 23:22:15 +07:00
parent 4106eae5cf
commit db7c19b249
5 changed files with 54 additions and 26 deletions
@@ -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('votes', function (Blueprint $table) {
$table->string('related_type')->nullable()->after('related_id');
});
}
public function down(): void
{
Schema::table('votes', function (Blueprint $table) {
$table->dropColumn('related_type');
});
}
};