feat: tambah budget kegiatan dengan alur threshold approval/voting
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
<?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('activities', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('budget')->nullable()->after('description');
|
||||
});
|
||||
|
||||
Schema::table('cash_records', function (Blueprint $table) {
|
||||
$table->foreignId('activity_id')->nullable()->constrained('activities')->nullOnDelete()->after('category_id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('cash_records', function (Blueprint $table) {
|
||||
$table->dropForeignIdFor(\App\Models\Activity::class, 'activity_id');
|
||||
$table->dropColumn('activity_id');
|
||||
});
|
||||
|
||||
Schema::table('activities', function (Blueprint $table) {
|
||||
$table->dropColumn('budget');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user