Skip to content

Commit 5a8d2fe

Browse files
committed
Fixed sync_failed_at
1 parent 15e922c commit 5a8d2fe

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

config/laravel-event-logs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
'endpoint' => env('AZURE_EVENT_HUB_ENDPOINT'),
1919
'path' => env('AZURE_EVENT_HUB_PATH'),
2020
'primary_key' => env('AZURE_EVENT_HUB_PRIMARY_KEY'),
21-
'policy_name' => env('AZURE_EVENT_HUB_POLICY_NAME', env('AZURE_EVENT_HUB_POLICY')),
21+
'policy_name' => env('AZURE_EVENT_HUB_POLICY'),
2222
],
2323
],
2424

database/migrations/2025_08_09_115521_create_event_logs_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function up(): void
3939
$table->json('context')->nullable();
4040

4141
$table->dateTime('synced_at')->nullable();
42-
$table->dateTime('synced_failed_at')->nullable();
42+
$table->dateTime('sync_failed_at')->nullable();
4343

4444
$table->timestamps();
4545

src/Models/EventLog.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* @property array<string, mixed>|null $event_data
2929
* @property array<string, mixed>|null $context
3030
* @property \Carbon\Carbon|null $synced_at
31+
* @property \Carbon\Carbon|null $sync_failed_at
3132
* @property \Carbon\Carbon $created_at
3233
* @property \Carbon\Carbon $updated_at
3334
*
@@ -57,7 +58,7 @@ class EventLog extends Model
5758
'event_data',
5859
'context',
5960
'synced_at',
60-
'synced_failed_at',
61+
'sync_failed_at',
6162
];
6263

6364
/** @var array<string, string> */
@@ -69,7 +70,7 @@ class EventLog extends Model
6970
'event_data' => 'array',
7071
'context' => 'array',
7172
'synced_at' => 'datetime',
72-
'synced_failed_at' => 'datetime',
73+
'sync_failed_at' => 'datetime',
7374
];
7475

7576
/**
@@ -79,7 +80,7 @@ class EventLog extends Model
7980
public function scopeUnsynced(Builder $query): Builder
8081
{
8182
/** @var Builder<EventLog> */
82-
return $query->whereNull('synced_failed_at')->whereNull('synced_at');
83+
return $query->whereNull('sync_failed_at')->whereNull('synced_at');
8384
}
8485

8586
public function toArray(): array

tests/Unit/Models/EventLogTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
'event_data',
118118
'context',
119119
'synced_at',
120-
'synced_failed_at',
120+
'sync_failed_at',
121121
];
122122

123123
expect((new EventLog)->getFillable())->toBe($fillable);

0 commit comments

Comments
 (0)