Skip to content

Commit

Permalink
fix: add reference field in transactions for automations
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusantguerrero committed Jun 1, 2024
1 parent fed3380 commit b5dcd65
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Models/Core/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class Transaction extends Model
'has_splits',
'is_transfer',
'currency_code',
'status'
'status',
'reference',
'meta_data'
];

protected $dispatchesEvents = [
Expand Down
26 changes: 26 additions & 0 deletions src/database/migrations/2023_10_17_152019_add_reference_field.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('transactions', function (Blueprint $table) {
$table->string('reference')->after('description');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};

0 comments on commit b5dcd65

Please sign in to comment.