diff --git a/database/migrations/2025_02_14_084000_add_coa_id_to_kas_masuks_table.php b/database/migrations/2025_02_14_084000_add_coa_id_to_kas_masuks_table.php new file mode 100644 index 0000000..dafa208 --- /dev/null +++ b/database/migrations/2025_02_14_084000_add_coa_id_to_kas_masuks_table.php @@ -0,0 +1,23 @@ +unsignedBigInteger('coa_id')->nullable()->after('user_id'); // Tambahkan kolom COA + $table->foreign('coa_id')->references('id')->on('coas')->onDelete('set null'); // Relasi ke tabel COA + }); + } + + public function down() + { + Schema::table('kas_masuks', function (Blueprint $table) { + $table->dropForeign(['coa_id']); + $table->dropColumn('coa_id'); + }); + } +};