Add index to fee_invoice_id

This commit is contained in:
David Bomba 2024-06-23 14:04:43 +10:00
parent cf2fc80f06
commit 3ec604919e
3 changed files with 31 additions and 0 deletions

View File

@ -192,6 +192,7 @@ class ImportController extends Controller
$contents = file_get_contents($file->getPathname());
// Store the csv in cache with an expiry of 10 minutes
Cache::put($hash.'-'.$entityType, base64_encode($contents), 600);
nlog($hash.'-'.$entityType);
}
}

View File

@ -104,6 +104,8 @@ class BaseImport
return null;
}
nlog("found {$entity_type}");
$csv = base64_decode($base64_encoded_csv);
$csv = mb_convert_encoding($csv, 'UTF-8', 'UTF-8');

View File

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('payment_hashes', function (Blueprint $table) {
$table->unsignedInteger('fee_invoice_id')->nullable()->index()->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};