Skip to content

Commit

Permalink
fix: existing content not being flushed before seeding
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangjchandler committed Oct 18, 2023
1 parent becee16 commit d09a170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Actions/MaybeRefreshDatabaseContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function refresh(Orbit&Model $model, Driver $driver): void
->chunk(100)
->each(function (Collection $chunk) use ($model, $blueprint) {
// This will ensure that we don't have any collisions with existing data in the SQLite database.
$model->query()->whereKey($chunk->pluck($model->getKey())->all())->delete();
$model->query()->whereKey($chunk->pluck($model->getKeyName())->all())->delete();

$model->query()->insert(
$chunk
Expand Down

0 comments on commit d09a170

Please sign in to comment.