Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangjchandler committed Oct 3, 2023
1 parent 9239801 commit b4540d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Actions/MaybeRefreshDatabaseContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public function refresh(Orbit&Model $model, Driver $driver): void
collect($records)
->chunk(100)
->each(function (Collection $chunk) use ($model) {
// This will ensure that we don't have any collisions with existing data in the SQLite database.
$model->query()->whereKey($chunk->pluck($model->getKey()))->delete();
$model->insert($chunk->all());
});
Expand Down

0 comments on commit b4540d1

Please sign in to comment.