Add checks for job_batches

This commit is contained in:
David Bomba 2025-01-30 20:30:23 +11:00
parent f52228d1a1
commit 2a985d581c
1 changed files with 15 additions and 12 deletions

View File

@ -12,18 +12,21 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary(); if (!Schema::hasTable('job_batches')) {
$table->string('name'); Schema::create('job_batches', function (Blueprint $table) {
$table->integer('total_jobs'); $table->string('id')->primary();
$table->integer('pending_jobs'); $table->string('name');
$table->integer('failed_jobs'); $table->integer('total_jobs');
$table->longText('failed_job_ids'); $table->integer('pending_jobs');
$table->mediumText('options')->nullable(); $table->integer('failed_jobs');
$table->integer('cancelled_at')->nullable(); $table->longText('failed_job_ids');
$table->integer('created_at'); $table->mediumText('options')->nullable();
$table->integer('finished_at')->nullable(); $table->integer('cancelled_at')->nullable();
}); $table->integer('created_at');
$table->integer('finished_at')->nullable();
});
}
\App\Models\CompanyGateway::withTrashed()->where('gateway_key','b9886f9257f0c6ee7c302f1c74475f6c') \App\Models\CompanyGateway::withTrashed()->where('gateway_key','b9886f9257f0c6ee7c302f1c74475f6c')
->cursor() ->cursor()