finish with debit and credit operations
This commit is contained in:
parent
dd4836e49f
commit
313507835c
|
|
@ -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');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue