finish with debit and credit operations

This commit is contained in:
root 2026-02-24 14:00:23 +01:00
parent dd4836e49f
commit 313507835c
1 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddStatusToWalletIlinkTransactionTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('wallet_ilink_transaction', function (Blueprint $table) {
if(!Schema::hasColumn('wallet_ilink_transaction', 'status', 'bank_account_number', 'bank_name')) {
$table->enum('status', ['PENDING', 'PROCESSING', 'SUCCESS', 'FAILED', 'CANCELED'])->default('PENDING')->after('payment_transaction_id');
$table->string('bank_account_number')->nullable()->after('status');
$table->string('bank_name')->nullable()->after('bank_account_number');
}
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('wallet_ilink_transaction', function (Blueprint $table) {
if(Schema::hasColumn('wallet_ilink_transaction', 'status')) {
$table->dropColumn('status');
$table->dropColumn('bank_account_number');
$table->dropColumn('bank_name');
}
});
}
}